I want my view controller to check if there is an image on another view controller when i click a button. But as of now even there is an image the simulator does not execute the loop.
Code:
- (IBAction)buttonClicked:(id)sender {
iPhotoViewController *photo = [[iPhotoViewController alloc] initWithNibName:@"iPhotoViewController" bundle:nil] ;
if (photo.mainView.image)
{
but = (UIButton *) sender;
self.selectedImage = [_images objectAtIndex:but.tag];
iPhoto2AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.navController popViewControllerAnimated:YES];
[photo release];
}
Thanks, Praveen