uitabbarcontroller

Tab bar view goes blank when switched back to with search bar active

天涯浪子 提交于 2020-07-20 07:10:38
问题 Update 2: Since people are still looking at this question: know that I realized it's impossible to replicate this bug on an actual, isolated iOS device. When you present the search controller, iOS presents a keyboard as well, which covers the tab bar. To switch tabs, you must dismiss the keyboard, which will dismiss the search controller as well. The reason I say "isolated" is because I don't know if you can replicate this with a Bluetooth keyboard and don't have one to try. The iOS keyboard

How to slide TabBar up to hide it in tvOS app?

自作多情 提交于 2020-06-27 17:32:13
问题 In my tvOS app I have a TabBarController with 3 viewControllers. What I want to do is to automatically hide/change focus of the tabBar when I switch to the next viewController. I saw some posts here, on SO that suggested to change alfa on the tabBar, but I would like to have a slide up animation, same way as it does when you change focus to something in the viewController. Any kind of help is highly appreciated. 回答1: As Charles said.. Something like this in the derived UITabBarController: var

Change tab bar height and width and add rounded corners

大憨熊 提交于 2020-06-27 03:54:06
问题 I wonder if its possible to change the width and height and add rounded corners to a tab bar? More or less like this: I want to make the tab bar smaller and add rounded corners. I now that I can change the size with something like this: override func viewWillLayoutSubviews() { var tabFrame = self.tabBar.frame // - 40 is editable , the default value is 49 px, below lowers the tabbar and above increases the tab bar size tabFrame.size.height = 40 tabFrame.origin.y = self.view.frame.size.height -

Tap tab bar to scroll to top of UITableViewController

﹥>﹥吖頭↗ 提交于 2020-06-23 23:05:40
问题 Tapping the tab bar icon for the current navigation controller already returns the user to the root view, but if they are scrolled way down, if they tap it again I want it to scroll to the top (same effect as tapping the status bar). How would I do this? A good example is Instagram's feed, scroll down then tap the home icon in the tab bar to scroll back to top. The scrolling back to the top is easy, but connecting it to the tab bar controller is what I'm stuck on. 回答1: Implement the

Unable to change the color to tabBar?

本秂侑毒 提交于 2020-05-28 09:54:46
问题 I have the following method in the parantTabBarController class: There can be seen various attempts made to make the tabBar completely transparent. The only one that worked is the one found at the top. override func viewDidLoad() { super.viewDidLoad() UITabBar.appearance().barTintColor = UIColor.clear UITabBar.appearance().backgroundImage = UIImage() // UITabBar.appearance().barTintColor = UIColor.blue // changeTabBarOpacity() // self.tabBar.unselectedItemTintColor = UIColor(red: 17.0/255.0,

UITabBar controller gives previous selected index?

99封情书 提交于 2020-05-15 09:06:07
问题 I'm using Custom UITabBarController in the app to check selected index. I've this method to trigger when I select the selectedIndex : override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { // print(self.selectedIndex) switch self.selectedIndex { case 1: print("should load feed " + String(self.selectedIndex)) (self.viewControllers![1] as? PageViewController)?.downloadNews() case 2: print("should load saved" + String(self.selectedIndex)) (self.viewControllers![2] as?

UITabBar controller gives previous selected index?

对着背影说爱祢 提交于 2020-05-15 09:03:39
问题 I'm using Custom UITabBarController in the app to check selected index. I've this method to trigger when I select the selectedIndex : override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { // print(self.selectedIndex) switch self.selectedIndex { case 1: print("should load feed " + String(self.selectedIndex)) (self.viewControllers![1] as? PageViewController)?.downloadNews() case 2: print("should load saved" + String(self.selectedIndex)) (self.viewControllers![2] as?

Swift: how to show a tab bar controller after a login view

梦想的初衷 提交于 2020-05-09 17:58:19
问题 I have seen many posts similar to this here but they are all about Objective-C while I am developing my app in Swift. As you can see from the image I have a login screen view and I correctly implemented the login mechanism. Now I would like that when the login has succedeed, then the tab bar controller is showed. In my login view controller I have this function for login: var finalURL:NSString = "\(Settings.webServerLoginURL)?username=\(username)&password=\(password)" LoginService

Xcode 11 UINavigationController Bar problems

喜夏-厌秋 提交于 2020-04-12 02:26:11
问题 Ever since Xcode 11 came out I have been trying to fix my app. There is something going on with the Status Bar + Navigation Bar and nothing I have been trying seems to be working and I can't seem to find any related issues either. I have tried instantiating the Tab Bar Controller with less/more tabs. I tried changing the order. I tried using a navigation bar on the Tab Bar controller instead of the individual view controllers. For some reason the first View Controller (root of a UINavigation