How to test for an empty UIImageView?

Viewed 25322

I have the following code where I want to see if a particular UIImageView (image) is set. If not then I want to display an error message.

if (image==nil) {
        UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"No Image Selected" 
                                                                 delegate:nil 
                                                        cancelButtonTitle:@"OK" 
                                                   destructiveButtonTitle:nil 
                                                        otherButtonTitles:nil];

        [actionSheet showInView:[[self view]window]];
        [actionSheet autorelease];
    }
2 Answers
Related