小编Bul*_*lla的帖子

如何更改UINavigationController后退按钮名称?

我有一个UIViewController,我正在从我的第一个视图控制器导航到第二个视图控制器,我想要更改显示的按钮的名称navigationcontroller以便返回....

SecondViewController *secondController = [[SecondViewController alloc]
                                              initWithNibName:nil
                                              bundle:NULL]; 
[self.navigationController pushViewController:secondController  animated:YES];
Run Code Online (Sandbox Code Playgroud)

现在在第二个viewcontroller我想改变按钮的名称navigationController.

uiviewcontroller uinavigationcontroller uinavigationitem ios

57
推荐指数
3
解决办法
7万
查看次数

Google Drive API:以编程方式登录

我正在开发将文件上传到Google云端硬盘所需的应用程序.我从以下链接开始学习API. https://developers.google.com/drive/ios/quickstart

目前,我必须首次登录上传文件.但在我的应用程序中,每次有相同的帐户将用于上传文件.那么,有什么办法可以绕过GTMOAuth2ViewControllerTouch(登录界面).

请帮我.我将非常感谢你的重播.

ios google-drive-api google-oauth

6
推荐指数
1
解决办法
1686
查看次数

ARC [rewriter] NSInvocation的setArgument与不具有__unsafe_unretained的所有权的对象一起使用是不安全的

我一直把我的项目转换成ARC,我坚持这个错误.

与对象,与调用和&callerToRetain正显示出我的错误"[重写] NSInvocation的的setArgument是不是安全,可以使用一个对象,具有比其他__unsafe_unretained所有权"

+ (void)performSelector:(SEL)selector onTarget:(id *)target withObject:(id)object amount:(void *)amount callerToRetain:(id)callerToRetain{if ([*target respondsToSelector:selector]) {
    NSMethodSignature *signature = nil;
    signature = [*target methodSignatureForSelector:selector];
    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];

    [invocation setSelector:selector];

    int argumentNumber = 2;

    // If we got an object parameter, we pass a pointer to the object pointer
    if (object) {
        [invocation setArgument:&object atIndex:argumentNumber];
        argumentNumber++;
    }

    // For the amount we'll just pass the pointer directly so NSInvocation will call the method using the number itself rather than a pointer …
Run Code Online (Sandbox Code Playgroud)

nsinvocation automatic-ref-counting

1
推荐指数
1
解决办法
1736
查看次数