I wrote an app that takes a pic/chooses a pic from the library, goes to another view and gives it a rating with a few options to share - Twitter/FB/etc. There is also a button to go back to the first view to go through the process of selecting a picture again. However, after the user goes 开发者_Go百科back and reaches the second view for the second time, when he pushes the share button, the app crashes.
Could it be because for the back button I'm only saying "dismissModalViewController"? I mean, should I push the first view before dismissing the modal view controller? But then, what's the "variable" that's used for my first view?
Thanks!
Error code is EXC_BAD_ACCESS for this line:
UIViewController *topViewController = [self getTopViewController];
精彩评论