开发者

dismissModalViewControllerAnimated: freezes app, not a crash

开发者 https://www.devze.com 2023-03-12 16:04 出处:网络
Edit- I had accidentally synthesized parentViewController Edit/ This was working, and now it isn\'t, I don\'t think that I have done anything in code that would affect this behavior.

Edit-

I had accidentally synthesized parentViewController

Edit/

This was working, and now it isn't, I don't think that I have done anything in code that would affect this behavior.

Here is what I am doing:

I have a view and associated view controller, called NewAssetViewController. NewAssetViewController's view has a mixture of UITextFields and UITextViews:

dismissModalViewControllerAnimated: freezes app, not a crash

when I click on the UITextView I receive the delegate method textViewShouldBeginEditing: in this method I present my customController view called MultiPicker:

[self presentModalViewController:multiPicker animated:YES];

if the user selects a button on this interface it either cancels, or returns selecting a value, I will only use the cancel case because it behaves the same way, and doesn't have any extra code.

multipicker's cancel method:

-(IBAction)cancel:(id)sender
{
//close returning nothing...
    [delegate multiPickerDidCancel:self];
}

which calls NewAssetController's multiPickerDidCancel: method:

-(void)multiPickerDidCancel:(MultiPicker *)aMultiPicker
{
    [self dismissModalViewControllerAnimated:YES];
    [aMultiPicker reset];

}

at this point now it freezes, doesn't crash, if I pause the debugger, this is what the trace looks like:

dismissModalViewControllerAnimated: freezes app, not a crash

with the frame above representing some assembly:

0x00ec121e  <+0317>  mov    %eax,%edi
0x00ec1220  <+0319>  jmp    0xec11bb <-[UIViewController dismissModalViewCont开发者_如何学GorollerWithTransition:]+218>
0x00ec1222  <+0321>  mov    0x4e446b(%ebx),%eax
0x00ec1228  <+0327>  mov    %eax,0x4(%esp)
0x00ec122c  <+0331>  mov    %edi,(%esp)
0x00ec122f  <+0334>  call   0x128e98a <dyld_stub_objc_msgSend>
0x00ec1234  <+0339>  mov    %eax,-0x1c(%ebp)
0x00ec1237  <+0342>  mov    0x4e1bcb(%ebx),%edx
0x00ec123d  <+0348>  mov    %edx,0x4(%esp)
0x00ec1241  <+0352>  mov    %esi,(%esp)
0x00ec1244  <+0355>  call   0x128e98a <dyld_stub_objc_msgSend>
0x00ec1249  <+0360>  cmpl   $0x3,-0x20(%ebp)
0x00ec124d  <+0364>  jne    0xec1277 <-[UIViewController dismissModalViewControllerWithTransition:]+406>
0x00ec124f  <+0366>  mov    0x4e295f(%ebx),%eax
0x00ec1255  <+0372>  mov    %eax,0x4(%esp)
0x00ec1259  <+0376>  mov    %edi,(%esp)


I had accidentally synthesized parentViewController, not my day...

0

精彩评论

暂无评论...
验证码 换一张
取 消