uitabbar

UITabBar functionality without UITabBarController

感情迁移 提交于 2019-11-29 12:51:18
I have this problem, I've got a navigation-based application, and on the one of the detail view i need to have UITabBar, which will display some UITableViews. Since apple documentation says "you should never add a tab bar controller to a navigation controller" it make quite a problem, i've found this sample: link text , it's working, but after picking one of the table view, the UITabBar disappears. Now that you are not using a TabBarController for showing the tableviews (as mentioned in the link), have you made sure that the table views or any other views you are adding when a tab is tapped

Swift - How to change UITabBarItem badge font?

喜你入骨 提交于 2019-11-29 10:43:17
I have a UITabBar . I set a value for tab bar items: tabBarItem3?.badgeValue = String(self.numberOfProducts) Now I want to change its font to a specific font. Then I used this code : tabBarItem3?.setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .normal) It doesn't work. What should I do? Swift 3 UITabBarItem.appearance().setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .normal) UITabBarItem.appearance().setBadgeTextAttributes([NSFontAttributeName: UIFont(name: "IRANSans", size: 14)], for: .selected) UIKit updates the

maximum number of tabs for UITabBarController without moreViewController

蓝咒 提交于 2019-11-29 09:19:30
Short of actually creating a UITabBarController and performing the relevant experiment, does iOS have a programmatic way of getting the maximum number of tabs that could show up in the tabBarController, without a "more" tab? This would be highly helpful for some cross-platform work I'm doing. rmaddy The most is 5 (on an iPhone, 8 on an iPad). When you add a sixth you get the 1st four plus a More tab with the other two. This can't be changed using a standard UITabBarController . Search github or other resources. There may be drop in replacement classes that will let you have more tabs shown at

Keyboard hides TabBar

穿精又带淫゛_ 提交于 2019-11-29 09:16:43
问题 I am working in a TabBar app. In one view there is a UISearchBar and, when is pressed, the keyboard appears. The problem is that the keyboard hides the tabbar. Do you know how to solve it? 回答1: To my knowledge you cant move keyboard .. so try to use transformation to move the tab-bar above keyboard Taken from here Another link 回答2: It's been a while since this was asked, but for the sake of documentation, here it goes: First, subscribe to the NSNotificationCenter to receive the keyboard

An unwanted line on Tab bar controller under ios7

偶尔善良 提交于 2019-11-29 08:12:31
Under iOs7, and not earlier versions, I've a line who pass through my Tab Bar (shown with green arrow on example picture from the link below). I don't know where the problem come from. Any idea how to correct it ? Thank you very much. I think you have to check the height of UITabBar in iOS 7. It is possible Apple has decreased the height of UITabBar, as per height of UITabBar you have to redesign your image for accurate result. If you're referring to the couple of pixel shadow on top of the bar, it's easy to remove. All you have to do is enable clipsToBounds on your tab bar, like so: [self

UINavigationBar appearance refresh?

女生的网名这么多〃 提交于 2019-11-29 05:51:27
问题 In my iPad app I have an application settings view. One of the options lets the user switch interface color scheme. The settings view is loaded by segue to a separate view controller than my "main" app's window. When they pick a new color I switch the colorSchemeColor variable and do this: // set the colors and refresh the view [[UINavigationBar appearance] setBarTintColor:colorSchemeColor]; [[UIToolbar appearance] setBarTintColor:colorSchemeColor]; [[UITabBar appearance] setBarTintColor

Colour changed in iOS7.1, how to change searchBar colour?

て烟熏妆下的殇ゞ 提交于 2019-11-29 04:05:14
问题 On iOS7.0.3 - 7.0.6, my searchBar colour is Gold/yellow colour like this: But on iOS 7.1, colour becomes like this: I set searchBar.tintColor = [UIColor clearColor]; searchBar.backgroundColor = goldColor; searchBar.tintColor = [UIColor blackColor]; I've tried so many ways and all are failed. Can anyone figure out what changes in iOS 7.1? ============== My fix =============== I fix this problem by covering a view on searchBar and add the search text filed as subview on this new view. I need

Set tab bar item selected image in xcode 6

扶醉桌前 提交于 2019-11-29 03:32:42
问题 This is my setup for a tab bar item: However when clicking on the item inside the app the 1051-id-badge-selected image is not shown, instead nothing is shown: Is something wrong with my setup? Any ideas? 回答1: To get around this issue and set selected image without writing any code, we can also use "User Defined Run Attributes". Select the tab bar item, then in 'Identity Inspector', add a new value from 'User Defined Runtime Attributes'. Set the 'Key Path' to selectedImage , and choose 'Type'

Disable action - user taps on tabbar item to go to root view controller

六月ゝ 毕业季﹏ 提交于 2019-11-29 03:08:55
I want to disable the default action when user taps the tabbar item. For example, i have a tabbar with Tab1, Tab2 and Tab3. In Tab1, user can navigate from View1 to View3 (View1 > View2 > View3). If user is at View3, and he taps the Tab1, the application takes the user to View1 (the root view controller). I want to disable this functionality. I don't want the tap on Tab1 to pop all the view controllers. How can i do that? Edit: This behavior is a little strange, but a handy shortcut in case of deep hierarchy! You can implement following UITabBarControllerDelegate methods to disable this system

UItabbar item not showing storyboard reference

怎甘沉沦 提交于 2019-11-29 01:39:01
问题 I'm trying to use the new storyboard references in a tabbar. When I use the storyboard reference, the UITabBarItem (with customized image & text set), isn't showing anything. See setup: storyboard setup tabbaritem setup I fixed it for now by setting the images & title in the initWithCoder function for the initial viewcontroller in the referenced storyboards like so: static NSString *const ContactsViewControllerTabContactImageName = @"tab-contact"; static NSString *const