uinavigationcontroller

Transitioning to landscape rotation within a uinavigationcontroller

无人久伴 提交于 2019-12-17 14:28:31
问题 I want to push a landscape view from within a uinaviagtioncontroller, whose initial view is in portrait... So you click a button, or tableviewcell, and the screen rotates 90° into the new view.. How would I manage that? This is similar to how the Youtube app works when transitioning from movie info screen to the actual movie. (note: i am not interested in what rotation the user is holding the device) 回答1: What appears in YouTube app when transitioning from the movie info screen to the actual

Creating a navigationController programmatically (Swift)

不羁岁月 提交于 2019-12-17 10:16:24
问题 I've been trying to redo the work on my app programmatically. (Without the use of storyboards) I'm almost done, except making the navigation controller manually. I've been doing some research but I can't find any documentation of implementing this manually. (I started making the app as a Single View Application) Currently, I only have 1 viewcontroller. And of course the appDelegate The navigation Controller, will be used throughout all pages in the application. If anyone could help me out, or

Changing the UINavigationBar background image

狂风中的少年 提交于 2019-12-17 09:31:40
问题 I've been trying to change the background image of the UINavigationBar of my application. I tried several ways. First I added to my AppDelegate class the following code: @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"navigationbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end But it wasn't working. My next try was to write a CustomizedNavigationBar Class which is

Dismiss modal view form sheet controller on outside tap

时光怂恿深爱的人放手 提交于 2019-12-17 09:23:10
问题 I am presenting a modal view controller as a form sheet and dismissing it when the cancel button, which is a bar button item, is clicked. I need to dismiss it when I tap on outside of that view. Please help me with a reference. Note: my modal view controller is presented with a navigation controller. @cli_hlt, @Bill Brasky thanks for your answer. I need to dismiss it when tap occurs outside of the modal view which is a form sheet. I am pasting my code below. -(void)gridView:(AQGridView *

Dismiss modal view form sheet controller on outside tap

家住魔仙堡 提交于 2019-12-17 09:23:07
问题 I am presenting a modal view controller as a form sheet and dismissing it when the cancel button, which is a bar button item, is clicked. I need to dismiss it when I tap on outside of that view. Please help me with a reference. Note: my modal view controller is presented with a navigation controller. @cli_hlt, @Bill Brasky thanks for your answer. I need to dismiss it when tap occurs outside of the modal view which is a form sheet. I am pasting my code below. -(void)gridView:(AQGridView *

Navigation bar show/hide

删除回忆录丶 提交于 2019-12-17 08:00:35
问题 I have an app with a navigation bar consisting of 2 bar buttons. I would like to hide and show this navigation bar when a user double taps the screen. Initially, the navigation bar should be hidden. When a user double taps the screen, the navigation bar should come up with an animation, like what can be seen in the iPhone's photo gallery. How can i do something this? Suggestions are always appreciated. 回答1: This isn't something that can fit into a few lines of code, but this is one approach

How to change the UINavigationController back button name?

♀尐吖头ヾ 提交于 2019-12-17 07:14:38
问题 I have a UIViewController and I'm navigating from my first view controller to second view controller and I want to change the name of the button shown on the navigationcontroller for going back .... SecondViewController *secondController = [[SecondViewController alloc] initWithNibName:nil bundle:NULL]; [self.navigationController pushViewController:secondController animated:YES]; now in the second viewcontroller I want change the name of the button in the navigationController . 回答1: In

How to enable back/left swipe gesture in UINavigationController after setting leftBarButtonItem?

回眸只為那壹抹淺笑 提交于 2019-12-17 07:10:29
问题 I got the opposite issue from here. By default in iOS7 , back swipe gesture of UINavigationController 's stack could pop the presented ViewController . Now I just uniformed all the self.navigationItem.leftBarButtonItem style for all the ViewControllers . Here is the code: self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:LOADIMAGE(@"back_button") style:UIBarButtonItemStylePlain target:self action:@selector(popCurrentViewController)]; after that, the

Meaning of Warning “while a presentation is in progress!”

回眸只為那壹抹淺笑 提交于 2019-12-17 07:08:14
问题 When I am integarting the Instagram in my project. I am getting a image from UIImagePickerController and after it i want to send it to Instagram But when I am sending image to Instagram by UIDocumentInteractionController delegate method presentOptionsMenuFromRect:inView: animated: like this [documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES]; The warning comes Warning: Attempt to present <_UIDocumentActivityViewController: 0x7584780> on while a

How can I change the font of the back button for my navigation bar?

天涯浪子 提交于 2019-12-17 06:35:36
问题 How can I change the font of the back button for my navigation bar. The back button is either "back" or the title from the previous view controller. I thought this viewDidLoad would work: navigationController?.navigationItem.leftBarButtonItem?.setTitleTextAttributes([NSFontAttributeName: UIFont(name: "FONTNAME", size: 20)!], forState: UIControlState.Normal) but the leftBarButton? optional returns nil . 回答1: Just tested your code and it seems the reason that line is returning nil is actually