uinavigationbar

how to change TTNavigator (for a web url) bottom bar color?

我只是一个虾纸丫 提交于 2019-12-11 16:03:07
问题 Here is a code i made to open a website via TTNavigator- - (IBAction)btnTemp_Click{ TTNavigator* navigator = [TTNavigator navigator]; navigator.supportsShakeToReload = YES; navigator.persistenceMode = TTNavigatorPersistenceModeAll; [navigator openURLAction:[[TTURLAction actionWithURLPath:@"http://www.google.com"] applyAnimated:YES]]; } and here i was able to manage its navigation bar items, color etc- - (void)addSubcontroller:(UIViewController *)controller animated:(BOOL)animated transition:

How can i add a next and previous button at the segmented Controller?

岁酱吖の 提交于 2019-12-11 15:25:37
问题 In my application I have a segmented controller at navigation bar and until now I have 6 buttons there. But now I want to add more 5 buttons with these 6 buttons at segmented controller but problem is I want to add an previous and next button at segmented controller to see previous buttons and next buttons of the segmented controller. NOTE THAT: I know how can set an segmented controller at navigation bar. Until now, I have become able to set segmented controller at navigation bar. If I

Add UIView in navigation bar

不打扰是莪最后的温柔 提交于 2019-12-11 15:21:37
问题 I want to create UINavigationBar with rounded corner. It will look like this What I am thinking is I add UIView with rounded corner and insert it in navigation bar. So this is my code let roundView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: 44)) roundView.backgroundColor = UIColor.whiteBackground roundView.roundCorners(corners: [.topLeft, .topRight], radius: 20) navigationController?.navigationBar.insertSubview(roundView, at: 0) setTitleTextColor(color:

How do I use XCTest to test if a navigationBar is not set to a specific colour in objective-C?

大憨熊 提交于 2019-12-11 14:57:07
问题 Trying to test for navigationBar colour of a table view controller. I've set the barTintColor of the navigationController in the table view controller. I have written the following test: - (void)testNavBarColourOfMasterViewController { VAGMasterViewController *mvc = [[VAGMasterViewController alloc] init]; [mvc view]; XCTAssertEqualObjects([[[mvc navigationController] navigationBar] barTintColor], [UIColor whiteColor]); } Error: test failure: -[VAGMasterViewControllerTests

BarButtonItem not showing up

匆匆过客 提交于 2019-12-11 14:49:59
问题 In an app Im making, Im trying to enable login/logout to twitter. I want it so that there is a barbuttonitem that either says login if there is no current user, or logout if there is one. I created two buttons on the storyboard, one for login and one for logout. In the viewDidLoad(), I have this code: self.navigationItem.rightBarButtonItem = nil self.navigationItem.rightBarButtonItem = nil if twitterUser.currentUser != nil { print("there is a current user") self.navigationItem

How to customize UINavigationBar with XIB?

本小妞迷上赌 提交于 2019-12-11 13:56:23
问题 UIViewController has a property called UINavigationItem. So how can a UIViewController refer to UINavigationBar? The UINavigationBar is not displayed yet till UIViewController is pushed into a UINavigationController. So it's not available in viewDidLoad. So how do we customize it? I added UINavigationBar to the XIB. However, how do I specify that I want to use THAT UINavigationBar rather than the one provided by UINavigationController? 回答1: I added UINavigationBar to the XIB. However, how do

Unable to change navigation bar opacity

一曲冷凌霜 提交于 2019-12-11 13:13:55
问题 I am trying to style my app in the following way, however i am unable to get my navigation bar to reach this level of opacity I use the following code to style the navigation bar: unc application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { UINavigationBar.appearance().barTintColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.1) UINavigationBar.appearance().tintColor = UIColor.whiteColor() UINavigationBar.appearance()

Back button is not visible in Navigation Bar in iPhone OS 4.0 in iPhone

点点圈 提交于 2019-12-11 13:06:38
问题 In my application (View based), the back buttons are not visible in the navigation bar. If I click that button, the actions works properly. It's very weird to me. The back button is visible and properly working in iPhone OS 3.0 and others.(Except OS 4.0). I am currently working in iPhone OS 4.0. Here is my code: UIButton *btn=[[UIButton alloc] init]; [btn setImage:[UIImage imageNamed:@"Back.png"] forState:UIControlStateNormal]; [btn addTarget:self action:@selector(backAction) forControlEvents

White space under the navigation bar

对着背影说爱祢 提交于 2019-12-11 12:34:09
问题 When self.navigationController.navigationBar.translucent = NO , a white space occur under the navigation bar, like this: How can I remove it? // From above example (void)loadUI { [self.countriesButton setBackgroundColor:[UIColor colorWithRed:(243/255.0) green:(178/255.0) blue:(128/255.0) alpha:1]]; [self.countriesButton.layer setCornerRadius:10]; [self.countriesButton setClipsToBounds:YES]; /// set attributes for Navigation Bar self.navigationItem.title = @"Welcome"; // Title of Navigation

Bug when swiping from view with uinavigationbar to one without

淺唱寂寞╮ 提交于 2019-12-11 12:21:19
问题 I have an application with 2 viewcontrollers, ViewController and NextViewController. ViewController does not have a navigation bar and has a white status bar. NextViewController does have a navigation bar and has a black (default) status bar. I have encountered a bug when swiping back to ViewController from NextViewController and cancelling the swipe where the navigation bar on NextViewController will disappear. The storyboard simply has the two views with a button and an action segue. The