FPPopover icon indicating copy to clipboard operation
FPPopover copied to clipboard

Remote Notification app issue with FPPopover

Open smsivabe opened this issue 12 years ago • 2 comments

Hello, I am using FPPopover in my project and i was successful in displaying the popup in one of my view controller uibutton. I am using remote notification as well in my app. when i open the app through notification which i recieved and try to click the uibutton for popup, i was not able to get the popup. Can you please help me out?

smsivabe avatar Feb 11 '13 16:02 smsivabe

Hi. Can you paste here the related code where you are showing the popover please?

alvises avatar Feb 23 '13 16:02 alvises

My application using remote notification function in AppDelegate page. UIbutton click to show FPPopover controller in viewcontroller page, FPPopover working fine in the ViewController when the application is open through normal application navigation. But the issue arises when i navigate to the view controller through push notification.

AppDelegate.m

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert |UIRemoteNotificationTypeBadge| UIRemoteNotificationTypeSound)]; NSDictionary *remotenotification= [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];

if(remotenotification){
         ViewController *Vc =[[ViewController alloc] initWithNibName:nil bundle:nil];
          self.window.rootViewController = Vc;
    [self.window makeKeyAndVisible];
}

ViewController.m

-(IBAction)btnAction:(id)sender{ FPViewController *fpvc=[[FPViewController alloc]init]; UIBarButtonItem *cancel =[[UIBarButtonItem alloc]initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(didclickCancelButton)]; UIBarButtonItem *submit =[[UIBarButtonItem alloc]initWithTitle:@"Submit" style:UIBarButtonItemStyleBordered target:self action:@selector(Submit)]; fpvc.navigationItem.leftBarButtonItem=cancel; fpvc.navigationItem.rightBarButtonItem=submit; UINavigationController *navigation =[[UINavigationController alloc]initWithRootViewController:fpvc]; popover = [[FPPopoverController alloc] initWithViewController:navigation]; //popover.arrowDirection = FPPopoverArrowDirectionAny; popover.tint = FPPopoverDefaultTint; if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { popover.contentSize = CGSizeMake(300, 600); } else { popover.contentSize = CGSizeMake(300, 600); } popover.delegate=self; popover.arrowDirection = FPPopoverArrowDirectionAny; [popover presentPopoverFromView:(btnPostion)]; }

FPPopover popup displays without any issue when i open the application normally. It doesnt show only when the application is opened through push notification.

smsivabe avatar Feb 26 '13 08:02 smsivabe