我正在使用iOS 6.我的应用程序有一个嵌入了CustomViewController的标准导航控制器.在这个控制器中,我创建了一个这样的模态视图:
-(IBAction)presentModalList:(id)sender {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
StationsListViewController *list = [storyboard instantiateViewControllerWithIdentifier:@"StationsListViewController"];
[list setStationsData: [self.stationsData allValues]];
[self presentModalViewController:list animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
模态控制器显示完美,但解雇会产生警告.该控制器中的消除方法是:
-(IBAction)backToMap
{
[self dismissModalViewControllerAnimated:YES];
}
Run Code Online (Sandbox Code Playgroud)
生成的警告是警告:
在演示或解雇正在进行时,尝试从视图控制器<UINavigationController:0x1ed91620>中解除!
关于那个的任何线索?
谢谢
我无法正常显示模态视图控制器.我有一个父视图控制器,它是模态视图A的委托.在模态视图中AI呈现模态视图B,并具有委托dimiss模态视图A.
当模态视图B出现时,它似乎显示但屏幕变暗,并且UI锁定,但应用程序不会崩溃.我将动画设置设置为NO,我仍然遇到同样的问题.
活动顺序:
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 0x30011940 in objc_msgSend ()
#1 0x30235f24 in CFRelease ()
#2 0x308f497c in -[UIImage dealloc] ()
#3 0x30236b78 in -[NSObject release] ()
#4 0x30a002a0 in FlushNamedImage ()
#5 0x30250a26 in CFDictionaryApplyFunction ()
#6 0x30a001a4 in _UISharedImageFlushAll ()
#7 0x30a00738 in +[UIImage(UIImageInternal) _flushCacheOnMemoryWarning:] ()
#8 0x3054dc80 in _nsnote_callback ()
#9 0x3024ea58 in _CFXNotificationPostNotification ()
#10 0x3054b85a in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#11 0x3054dbc0 in -[NSNotificationCenter postNotificationName:object:] ()
#12 0x30a00710 in -[UIApplication _performMemoryWarning] ()
#13 0x30a006a8 in …Run Code Online (Sandbox Code Playgroud) iphone ×3
cocoa-touch ×2
callstack ×1
cocoa ×1
ios ×1
ios5 ×1
ios6 ×1
objective-c ×1
stack-trace ×1