uinavigationbar

SwiftUI Custom navigation bar with list

半腔热情 提交于 2019-12-23 21:28:52
问题 I made a list similar to the apple one seen below but I really don't like how the UInavigation bar looks like. Ideally I would want it smaller or have it hidden so I could put my own view there. I've tried to hide it by using the following from apple appearance api init() { UINavigationBar.appearance().backgroundColor = .green UINavigationBar.appearance().isHidden = true } even having the navigation bar like this would be more ideal compared to having the giant title but this has no impact,

Add customview in navigation bar like whatsapp

醉酒当歌 提交于 2019-12-23 20:15:02
问题 I want to create custom navigation bar like WhatsApp uses to display call indicator in the application as given below. I have successfully added view like above but it's not responsive because I am not able to detect touch on status bar. I can touch only part below "Touch to return to call". Code is as given below. @property (nonatomic) UIView *navigationBarTopView; UIWindow *window = [UIApplication sharedApplication].keyWindow; if (_navigationBarTopView == nil) { _navigationBarTopView = [

Why can't I set a custom color-tint for the UINavigationBar?

删除回忆录丶 提交于 2019-12-23 18:33:54
问题 I want to change the color on the navigation bar and the documentation states not to attempt to change the 'alpha' value. So, how can I set a color that is not the SDK defined values (e.g., [UIColor redColor], brownColor, etc.) if all the constructors provide an alpha value? I tried getting the current alpha value but that did not help. When I use a custom color, it causes the navigation bar to look like an x-ray (a scraggy, black-on-white). [self.navigationController.navigationBar

Back Button Left Alignment IOS 9

大憨熊 提交于 2019-12-23 17:03:36
问题 I am trying to left align back button i.e remove the space on the left of the back arrow . Using a custom back button . let backButton = UIBarButtonItem(image: UIImage(named: "arrow03"), style: .Plain, target: self, action: "back") self.navigationController?.navigationBar.tintColor = UIColor.clearColor() self.navigationItem.backBarButtonItem = backButton Tried to use negative width for the button as suggested in the below SO link but it didnt work. How to Edit Empty Spaces of Left, Right

android Navigation Bar hiding and persantage of usable screen overlap

ぐ巨炮叔叔 提交于 2019-12-23 15:44:52
问题 My problem is about persantage of usable screen . My application working well normally but ı assume that if ı change dimension of screen (for example galaxy s8+) it is down. this is how is working fine strong text and this is the wrong one the problem related with NavigationBar. I tried to set MACHPARENT params and normally I use programmatically DisplayMetrics metrics = this.getResources().getDisplayMetrics(); width = metrics.widthPixels; height = metrics.heightPixels - Utils

How to manually add a Back button to my NavigationBar?

混江龙づ霸主 提交于 2019-12-23 15:10:29
问题 I would like to know how I can add a back button to my UINavigationBar , I know that If I embed in a Navigation Controller in my main view, that all of this would happen automatically, but that is not what I am trying to do, in fact, the back button could go to any other view I connect the segue to, doesn't even have to be the back. The back button needs to be the system navigation "back" button, I don't want to have to set image files for my buttons. I tried dragging in a bar button item in

iOS 7 navbar colours not showing properly on iPhone 4

[亡魂溺海] 提交于 2019-12-23 13:21:00
问题 My navigation bar colours appear normally in iOS 7 Deploying iOS 6.0, but if the system version is iOS 7.0 or later, some of the navigation bar colouring doesn't display properly on iPhone 4. Works fine in iPhone 5. Here's how I am doing it: if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { self.edgesForExtendedLayout = UIRectEdgeNone; [self.navigationController.navigationBar setBarTintColor:[UIColor blueColor]]; [self.navigationController.navigationBar setTranslucent:YES]; } #define

I can't set UINavigationBar's barTintColor to clearColor successfully

孤街浪徒 提交于 2019-12-23 10:17:17
问题 There's a strange iOS 7 thing about UINavigationBar. If you try to set it's barTintColor property to [UIColor clearColor] or any color with a alpha = 0, it totally ignores that value. So for instance, if you write: [[navigationBar setBarTintColor:[UIColor clearColor]]; It doesn't respect the "clear" part at all. Same result with colorWithRed:green:blue:alpha . But the most interesting part is, if you set translucent property to NO , then it will take the color you specified BUT with alpha 1.

UINavigationBar right button not showing up

安稳与你 提交于 2019-12-23 10:17:15
问题 I am using the following function via a notification to load a right button on my UINavigationBar, and even though I can trace out the button and verify it is allocated, it does not show up...any ideas? EDIT 4/6/2011, 2:42PM So, something interesting...the width always reports as 0.0... - (void)showRightBarButton:(id)sender { NSLog(@"Showing button"); UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPI:)];

Create a subtitle in navigationbar

寵の児 提交于 2019-12-23 09:56:30
问题 In iOS you can create a title with: self.navBar.title = @""; where I set navBar in the header file. Is there also something for the subTitle / Description? I found description when I typed a . after self.navBar and thought maybe I could do something with this? 回答1: Use the self.navBar.navigationItem.prompt = @"This is the subtitle"; It's from UIKit in the base UINavigationViewController. 回答2: Objective-C code for the solution UILable *title = [[UILabel alloc]init]; UILabel *subtitle = [