uinavigationcontroller

How to customize UINavigationBar for the entire app?

你说的曾经没有我的故事 提交于 2019-12-24 12:30:02
问题 This is a bit different question than the previously asked. So be nice . The entire app has a navigation bar with different colors. The entire app has few options in its navigation bar. They all are same. What am I expecting ? I have created this extension for UINavigationController and able to change the navigation bar's background color as per the view controller I will be. extension UINavigationController { func updateNavigationBar(withViewControllerID identifier: String?) {

push a view controller from a UIView ios

巧了我就是萌 提交于 2019-12-24 11:37:03
问题 I have a navigation based application.On click of a button on the navigation bar in the first screen , I am able to push another view controller as follows : -(void) buttonClicked:(id)sender { UIViewController* mv = [[SecondViewController alloc] init]; [[self navigationController] pushViewController:mv animated:YES]; } Now i have a UIView(separate .h and .m files) as part of the first screen. On click of a button in the UIView, i want to push the SecondViewController. I have tried the

TabBarController inside NavigationController

蹲街弑〆低调 提交于 2019-12-24 10:43:31
问题 Imagine that we have multiview apllication which is controlled by Navigation Controller. We go from the first view to second by using pushViewController method and that's not a problem but then we need to move to the third view. And the third one is a view which looks like a TabBar. How do we do that? The third view is supposed to be controlled by TabBarController, isn't it? So how to pass the control? I declared an outlet UITabBarController * tbc and connected it to TabBarController in xib

Implement UItabbarController + UInavigationBar in project

倾然丶 夕夏残阳落幕 提交于 2019-12-24 10:01:25
问题 I have navigation controller based project. In my project I have Splash Screen & Login Screen where i have hidden the navigation controller. Now i have to implement TabbarController in the application and It need to be shown the screen after Login Page. I want to add it in AppDelegate.But my problem is that I have set rootviewcontroller of Window as navigation controller. And Now i want to use Tabbar controller also into the Appdelegate class. I am finding difficulty into it. Any help will be

Black smudge under navigation controller when transitioning

情到浓时终转凉″ 提交于 2019-12-24 09:08:51
问题 When I'm tabbing between pages attached to a navigation controller, sometimes there is a black mark under the navigation bar.. any ideas how to remove this? they're just blank pages. let vc = self.storyboard!.instantiateViewController(withIdentifier: page) self.show(vc, sender: self) i have tried setting background to white in navigation controller class like some threads recommend which didn't do anything. 回答1: The "smudge" happens when you transition between a view controller whose

Black bar overtop navigation bar

痞子三分冷 提交于 2019-12-24 08:46:24
问题 Im creating an app that uses a navigation controller for a couple of the views. When i finally figured out how to set it up this happened: So obviously the black bar at the top is not supposed to be there, but i dont know what to do to get rid of it. Any ideas? 回答1: This is also commonly seen when setting up a view programmatically. Be sure to use: myView.frame = self.view.bounds; and not: myView.frame = self.view.frame; 回答2: Looks like your view thinks it's supposed to have a status bar. Go

Objective c - how to display a shorter name of viewController on back button

折月煮酒 提交于 2019-12-24 08:35:13
问题 I almost sure I saw someday that there is some property to set a shorter name of viewController to be display in the back button when it push another viewController and become the back viewController. Can some one remind me what is this property? 回答1: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization self.title = @"First View Controller"; // this defines the back

Tabbar Item in Swift

≡放荡痞女 提交于 2019-12-24 08:30:07
问题 I have some issue in Tabbar controller . I put " FAQ " tab bar item in the bottom. When the app runs on the small screen devices, it automatically appears in More section. The problem is that I put "Nav Bar" in FAQ view controller. For large screens (ipad), FAQ bar item shows in bottom. When Navbar item goes to More section, navbar is appear as two bar. One bar is that I make and another bar is default bar. My current problem solving way is if (UIDevice.current.userInterfaceIdiom ==

UINavigationContoller swipe back function not working if its view is added to UIViewContoller

和自甴很熟 提交于 2019-12-24 06:00:37
问题 I have a UIViewController(RootViewController) set as the root view controller of the UIWindow. Any view / view controller is added to this RootViewController subview including a UINavigationController. I found that there is a new behaviour in iOS7 for UINavigationController that you can swipe back to the previous view controller. But it doesn't not work for my case. If I set the UINavigationController as the root view controller of the UIWindow. It works. So my questions is why can't it swipe

Sharing data between multiple view controllers without segue (Swift 3)

China☆狼群 提交于 2019-12-24 05:54:17
问题 I'm doing a QR code scanner quiz app where users must get a score of 10 from doing 10 questions. After a user the 1st qn, the score will plus 1 and it will revert them back to the qr scanner page where they must scan the QR code for the next qn. The problem is the passing of the score data. Is there a way to do it without segue? This is my qn1controller import UIKit class Quiz1Controller: UIViewController { @IBOutlet var question: UILabel! @IBOutlet var button1: UIButton! @IBOutlet var