I have main dashboard (UITableViewController
) and once i sign in i need to show this page with a welcome message which am showing using a UIViewController
.
How can i show this popup from my ViewDidAppear()
method ?
Am using following code and its not working
-(void)viewDidAppear:(BOOL)animated{
popupObj= [self.storyboard instantiateViewControllerWithIdentifier:@"popup"];
[popupObj setModalPresentationStyle:UIModalPresentationCurrentContext];
}
please help me..
i saw couple of stackoverflow links
Update
When i change my code to this one
-(void)viewDidAppear:(BOOL)animated{
popupObj= [self.storyboard instantiateViewControllerWithIdentifier:@"popup"];
// [popupObj setModalPresentationStyle:UIModalPresentationCurrentContext];
popupObj.modalPresentationStyle = UIModalPresentationOverCurrentContext;
popupObj.modalTransitionStyle = UIModalPresentationPopover;
[self presentViewController:popupObj animated:YES completion:nil];
}
Now i can see my UIViewController
coming as popup but now UIViewController
coming as full screen view.
But i need only this frame (320 , 320)