Created
February 24, 2014 07:28
-
-
Save eytanschulman/9183381 to your computer and use it in GitHub Desktop.
This is the crash I get in my output when I tap on a button that launches a UIActionSheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-02-24 09:25:10.553 Staff Manager[403:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Sheet can not be presented because the view is not in a window: <UIView: 0x18a497c0; frame = (0 0; 320 568); autoresize = RM+BM; layer = <CALayer: 0x18a4a430>>' | |
Basically heres the situation: I have a menu controller using REFrostedViewController(can be found here: https://github.com/romaonthego/REFrostedViewController). The menu controller is working perfectly for everything but this, I tap on a cell in my menu, it dismisses the menu to goto the view it is on already and to call an action sheet, this is what happens. | |
Here is my code to call the action sheet: | |
reportssheet = [[UIActionSheet alloc] initWithTitle:@"Choose Your Report" delegate:self cancelButtonTitle:@"Canel" destructiveButtonTitle:nil otherButtonTitles:@"Class List",@"Grade (Student)",@"Attendance Total (Student)",@"Assignment Grade (Class)",@"Assignment Grade (Student)", @"Assignments Given (Class)",@"Weighted Final Grade (Student)",nil]; | |
[reportssheet setTag:1]; | |
[reportssheet showInView:self.view]; | |
I declare the action sheet in the .h file so I can access it from wherever in the m. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment