kevin-lyn / STPopup

STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
MIT License
2.6k stars 345 forks source link

UINavigationBar items not appearing #59

Closed daisyramos317 closed 8 years ago

daisyramos317 commented 8 years ago

enablepush

I am loading the view controller from a storyboard and STPopup Controller is instantiated here let storyboardID = UIStoryboard(name: "Push", bundle: nil) let popupController: STPopupController = STPopupController(rootViewController: storyboardID.instantiateViewControllerWithIdentifier("enablePush")) popupController.containerView.layer.cornerRadius = 4 popupController.presentInViewController(self)

In viewDidLoad() of this view controller I have:

self.contentSizeInPopup = CGSizeMake(300, 200) self.landscapeContentSizeInPopup = CGSizeMake(400, 200) self.navigationItem.rightBarButtonItem?.image = UIImage(named: "dismissPushIcon") self.navigationItem.title = "Enable Push"

However the navigation bar remains empty as in the picture above.

kevin-lyn commented 8 years ago

@daisyramos317 the code you posted should work. But can you try adding navigation items in storyboard instead?

daisyramos317 commented 8 years ago

I did try adding navigation items in Storyboard as well it still doesn't appear.