Why self.view is not available
- by amok
I have this code in the main view controller and it is working just fine and as I wanted.
loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Posting To Twitter..."
delegate:nil
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:nil];
[loadingActionSheet showInView:self.view];
I wanted that code to be reusable from different part of the project so I moved it in a separate file (UIView based).
The poblem that I am facing is that self.view is not available there and I don't know why because I am learning and I don't know enough to understand what I am missing.
What do I have to do/add/change to have the actionsheet shown in my current view even if that code lives somewhere else?