I have created a UIPopoverController and added it to a main view controller when clicking an setReminder button popoverView working fine. i want dismiss popupview if i click a save button how can i do?

**mainView.m**
-(void)btnSetReminderTapped:(id)sender
{
setReminderView =[[setReminder alloc]initWithNibName:@"setReminder" bundle:[NSBundle mainBundle]];
setReminderView.delegate = self;
FPPopoverController *popover = [[FPPopoverController alloc] initWithViewController:setReminderView];
popover.tint = FPPopoverDefaultTint;
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
popover.contentSize = CGSizeMake(400,400);
}
else {
popover.contentSize = CGSizeMake(320, 288);
}
popover.arrowDirection = FPPopoverArrowDirectionUp;
//sender is the UIButton view
[popover presentPopoverFromView:sender];
}
***setReminder.m***
- (IBAction) btnSaveTapped:(id) sender
{
}
Use delegate to notify your main view on
btnSaveaction and dismiss in that delegate.In your main ViewController implement it as
You have to create a delegate inside your SetReminder Class
and in implementation file(.m) you can sythesis it as follow
@end