uinavigationbar

UINavigationBar back button disappears

…衆ロ難τιáo~ 提交于 2019-12-24 21:51:06
问题 I have lost a lot of time with this weird error/bug. I have 2 ViewControllers with navigationController and I move from the first to the second with pushViewController. But when I push second viewController, it shows up and also backButton on the navigation bar shows up. But this button disappear in a very short time (about half a second). Title of the first viewC is ok and it`s also on the back button (I can catch it in the time it is shown up). Does anyone have a tip where could be the

UITabBarViewController Navigation Item in displays in Status Bar area on Launch

独自空忆成欢 提交于 2019-12-24 19:05:40
问题 When launching a UITabBarViewController from code in a storyboard the first view displays the navigation controller too high in the status area. Tapping the tabs corrects it, however the first view is incorrect. Do I need something else in the AppDelegate? Specific code solutions would be appreciated. Thanks - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Need something here??? return YES; } // initial UITabBarViewController in

BottomNavigationView design with XML *no programmatically

冷暖自知 提交于 2019-12-24 16:22:25
问题 Good day. How can I change icon and text color(active and inactive), using XML? <android.support.design.widget.BottomNavigationView android:id="@+id/nav_view" android:layout_width="0dp" android:layout_height="wrap_content" android:background="@color/colorPrimaryDark" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:menu="@menu/bottom_nav_menu" /> 回答1: Try this: <com.google.android.material

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?) {

UINavigationController barstyle property changes layout

戏子无情 提交于 2019-12-24 12:05:16
问题 I have a modal view controller which displays a navigation controller. The navigation controller in-turn has a regular UIViewController as its root view controller. The only UI element that the above-mentioned UIViewController has is a UISwitch. Now here's the problem: When I change the barStyle property of the navigation controller, the layout of the UISwitch inside the UIViewController changes. Here's what I am talking about: If I don't set the barStyle property, here's what I get: http:/

How to move from custom to transluscent NavigationBar and back? Display problems!

会有一股神秘感。 提交于 2019-12-24 11:28:23
问题 So, i got this Navigation-based App (with a custom NavigationBar - Category) and I have 2 problems here... @implementation UINavigationBar (Custom) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"bg_toolbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end Because of the Navigation-based App, most of the views have a height of 436px (= ScreenSize - NavigationBar height, as you probably know ;). I got one view similar to

How to add spacing to Left BarButtonItem Image with Swift 3

强颜欢笑 提交于 2019-12-24 09:57:44
问题 I would like to add space to the left of the bar button. So, I add this code. navbar.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin, .flexibleRightMargin] navbar.delegate = self UINavigationBar.appearance().barTintColor = UIColor(red: 0.0/255.0, green:49.0/255.0, blue:79.0/255.0, alpha:0.1) UINavigationBar.appearance().tintColor = UIColor.white UINavigationBar.appearance().isTranslucent = true UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName :

UINavigationBar .items accessor doesn't return the current UINavigationItem

我是研究僧i 提交于 2019-12-24 09:13:23
问题 In my UINavigationBar: didPopItem: function the navigation bar's _itemStack has n items in it, shown in the debugger, but the .items accessor function returns an array with n-1 items in it, missing the current navigation item, which is what I want to check. backItem returns the n-2 item instead of the n-1, etc. The didPopItem item is the 'n+1' item so that doesn't help either. How do I access the current UINavigationItem? I'm using the iPhone 3.0 SDK. 回答1: It seems that the "items" property

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 ==

iphone: setting background image in navigationbar is not fitting

被刻印的时光 ゝ 提交于 2019-12-24 07:18:17
问题 i have a table view that i want to make a custom uinavigationn bar i tried this code UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, self.view.bounds.size.width, self.view.bounds.size.height)]; //here for v, width= navBar width and height=navBar height // [view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"newsBanner.png"]]]; [self.navigationController.navigationBar addSubview:view]; the problem is the image is not centered cause its size is 640 x