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];
}
…
imageView.image == nil? Or, to check for empty images,CGSizeEqualToSize(imageView.image.size, CGSizeZero).