uinavigationcontroller

Storyboard UINavigation Controller Back Button Text

梦想的初衷 提交于 2019-12-19 04:02:12
问题 In XCode 4.5.1 creating a storyboard app with a Navigation controller, I am having a hard time trying to set the BACK button for any view controllers that are pushed. I'm using segue's and the view controller shows as expected. However I want to change the name of the navigation bar and back button dynamically and placed this in my ViewWillAppear: self.title = @"Select Songs"; [self.backButton setTitle:@"Add"]; changes the title of the navigation bar but the back button still displays the

How can I flip and enlarge a UIView it at the same time like iOS 7 iPad App Store?

末鹿安然 提交于 2019-12-19 03:37:39
问题 The iPad iOS 7 App Store has a pretty cool animation for when you click on an app icon (from the featured list when the icon is smaller, not a search result). Here is a picture of it in action: Basically, the icon flips and expands in size at the same time. There is a gradient behind it and the content view is smaller. So far, I have a custom VC transition setup and I have the enlargement part working okay, but I can't get the flip to jive. How can I mimic the App store animation? Here is the

Back button not appearing on UINavigationController

六眼飞鱼酱① 提交于 2019-12-19 03:24:25
问题 I have a UINavigationController setup in my AppDelegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Add the navigation controller's view to the window and display. [self.window addSubview:navigationController.view]; [self.window makeKeyAndVisible]; return YES; } In my RootViewController I am pushing another view onto the stack: //Show the deals DealViewController *dvc = [[DealViewController alloc] initWithNibName:@

Setting navigationController.hidesBarsOnSwipe = YES never shows my navbar again

◇◆丶佛笑我妖孽 提交于 2019-12-18 19:18:12
问题 When i set navigationController.hidesBarOnSwipe = YES and try swiping in the webView shown the navigation bar is hidden, but it will never show up again, when i try swiping to get it back. My ViewController is listening to the swipe event : [self.navigationController.barHideOnSwipeGestureRecognizer addTarget:self action:@selector(swipe:)]? But this selector is in fact never called again after the navigation bar is hidden because of the Swipe. Anyone implemented hidesBarOnSwipe ? Is it a known

Adding UIBarButtonItem to UINav..Controller

℡╲_俬逩灬. 提交于 2019-12-18 18:10:11
问题 i am not sure what i am missing here. I Have a custom UINavigationController and i am trying to add a persistant UIBarButtonItem to the bar. -(void)viewDidLoad { self.navigationBar.barStyle = UIBarStyleBlack; UIBarButtonItem *bbi = [[UIBarButtonItem alloc] initWithTitle:@"Nope..." style:UIBarButtonItemStyleBordered target:self action:@selector(goBack:)]; self.navigationItem.leftBarButtonItem =bbi; [bbi release]; } -(void)goBack:(id)sender { NSLog(@"go back now"); } what am i missing here? -

How to add navigation controller programmatically?

假装没事ソ 提交于 2019-12-18 17:29:39
问题 I use code below, but it is not loaded: UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; self.mapViewController = [storyboard instantiateViewControllerWithIdentifier:@"MapViewController"]; self.navigationController = [[UINavigationController alloc]initWithRootViewController:self]; self.navigationBar = [[UINavigationBar alloc]init]; [self.view addSubview:self.navigationBar]; [self.navigationController.navigationController pushViewController:self

Add a navigation bar to a view without a navigation controller

不想你离开。 提交于 2019-12-18 14:39:07
问题 I have a side menu that slides out to display a table view and from there I have segues that use the reveal view controller. The segue has to connect directly to the view controller; I can't use a navigation controller. How do I add a navigation bar with a bar button item without a navigation controller? 回答1: While there are several smart ways to answer your question. I just solved it programmatically and wrote the following code in my viewWillAppear (note - viewDidLoad is also okay, but not

How to slide in/out statusBar and navigationBar simultaneously?

♀尐吖头ヾ 提交于 2019-12-18 13:39:13
问题 I'd like to show and hide the statusBar and the navigationBar simultaneously using a slide effect. This is how I tried: [[UIApplication sharedApplication] setStatusBarHidden:hide withAnimation:UIStatusBarAnimationSlide]; [self.navigationController setNavigationBarHidden:hide animated:animated]; However, the duration of both animation is not the same. The status bar animation takes longer. I found no way how to specify the duration of either animation. Did I miss something obvious? 回答1: ios

Flip transition uinavigationcontroller push

守給你的承諾、 提交于 2019-12-18 13:38:28
问题 I am pushing a UIViewController in a navigation stack using the following code [UIView animateWithDuration:0.75 animations:^{ [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [self.navigationController pushViewController:ViewController animated:NO]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO]; }]; Now when I press back I want it to do the same animation but its not working. Any idea why? in ViewController.m

pushViewController without navigationcontroller

て烟熏妆下的殇ゞ 提交于 2019-12-18 12:58:13
问题 I have a class that is of type UITableViewController . This class has a member of type UINavigationBar that I use for adding in an edit button for the table view. Using this method calling is invalid. [self.navigationController pushViewController:controller]; How can I push a detail view onto the view after selecting a table row without wrapping my UITableViewController in a UINavigationController ? 回答1: You can't push a view controller onto a navigation controller if there is no navigation