小编Aar*_*ark的帖子

在iOS 7中有一些非常奇怪的UITextView ...不在iOS 6中?

我正在创建一个UITextView:

greetingTextView = [[UITextView alloc] initWithFrame:greetingRect];
Run Code Online (Sandbox Code Playgroud)

使用它很好,但是当它连接到deallocs的ViewController时,我只在iOS 7中出现内存泄漏?我甚至在绝望中取消了greetingTextView,但没有效果:

    [greetingTextView.undoManager removeAllActions];
    greetingTextView.delegate = Nil;
    [greetingTextView removeFromSuperview];
    greetingTextView = Nil;
Run Code Online (Sandbox Code Playgroud)

泄漏在这张图片中:

在此输入图像描述

所以它似乎与UITextView UndoManager有关?但为什么只在iOS 7?

问候

memory-leaks uitextview nsundomanager ios7

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

每次我尝试登录我的应用程序时FBSessionStateClosedLoginFailed

嗨,每次运行它都会返回FBSessionStateClosedLoginFailed的状态.我检查了我的包名称,URL设置等等都很酷.事实上,脸书知道我已经对应用程序进行了身份验证.但是,有时我打电话给openWithCompletion我的会话失败了!

     [appDelegate.session openWithCompletionHandler:^(FBSession *session,
                                                     FBSessionState status,
                                                     NSError *error) {
        switch (status) {
            case FBSessionStateOpen:
                NSLog (@"Open");
                break;
            case FBSessionStateClosed:
                NSLog (@"Closed");
                break;
            case FBSessionStateClosedLoginFailed:
                NSLog (@"Failed");
                break;
            default:
                break;
        }

        [self updateView];
    }];
Run Code Online (Sandbox Code Playgroud)

我在app委托中创建了这个也成功调用,但总是返回false:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    return [FBSession.activeSession handleOpenURL:url];
}
Run Code Online (Sandbox Code Playgroud)

facebook objective-c ios

5
推荐指数
2
解决办法
5543
查看次数