我正在创建一个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?
问候
嗨,每次运行它都会返回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)