Could someone please help me with the following code:
- (IBAction)addCellButton: (UIBarButtonItem *)sender
{
if(!self.imagePopover)
{
AlbumPicker *albumPicker = [self.storyboard instantiateViewControllerWithIdentifier:@"MultipleImagePicker"];
self.imagePopover = [[UIPopoverController alloc] initWithContentViewController:albumPicker];
albumPicker.delegate = self;
NSLog(@"%@", albumPicker.delegate);
[self.imagePopover presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
self.imagePopover.delegate = self;
}
}
The problem is is that when I check the delegate in my albumPicker.m by printing it, it is set to nil
? Am I setting the delegate properly?