uitabbarcontroller

Configuring a UITabBar with more than 16 items

被刻印的时光 ゝ 提交于 2019-12-21 20:23:38
问题 My UITabBarController contains more than 16 view controllers. When I go in the "More" tab, I can see all the UITabBarItems . If I click the "Edit" button, I can see the 16 first icons, but there is not enough room to display more, so starting from the 17th item, the icons are only partially displayed. Starting from the 21st item, the icons are not displayed at all. And it is not possible to access the rest of the icons with a scroll bar. By the way, this question gives a theoretical answer to

Touch above the uiTabBar

强颜欢笑 提交于 2019-12-21 20:14:21
问题 I have an app that has an UITabBarController. I've noticed that there are like 15 pixels above the tab bar that will push the button under it. And there are like 10 more pixels that don't do anything. The problem is that i have some button in the view that are quite close near the bar bar and when i try to touch them, the tabbar buttons get pushed. It seems like this is standard behavior for standard UI elements. I've noticed that the buttons from the navigation bar have the same efect

There is a black bottom space below the camera

為{幸葍}努か 提交于 2019-12-21 17:22:49
问题 I am presenting an UIImagePickerController from a UITabBarController . let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = .Camera imagePicker.allowsEditing = false imagePicker.showsCameraControls = false presentViewController(imagePicker, animated: true, completion: nil) I have explicitly set showsCameraControls to false to put my custom overlay view on top of camera.But why there is a black space on the bottom?any helps? 回答1: The camera aspect

Supporting Universal App with Portrait Orientation on iPhone and Landscape+Portrait on iPad

天涯浪子 提交于 2019-12-21 16:56:28
问题 I need my app to be compatible both on iPad and iPhone. Its having a tabbarController as the rootViewController. In iPad I need it to be available both on Landscape and Portrait. In iPhone though I need the rootView to be Portrait itself and i do have some viewsControllers, which are being presented on the tabbarController, which need to be available both in landscape and Portrait (e.g. a viewController used to play videos from Youtube). So I am locking the rotation of the tabbarController as

iPhone UITabbar item double-click pops controllers

此生再无相见时 提交于 2019-12-21 13:08:06
问题 just found out something: If you have a Tabbar combined with a NavigationController (that has some views on it's stack) and you double click the TabBarItem, the view pops to the first ViewController, whether you like it or not. Is there a way to prevent this? 回答1: You probably should not prevent this behavior. It's a standard iPhone UI convention, like tapping the status bar to scroll to the top of a scroll view. If you really want to do it, you should implement the UITabBarController

Customizing UITabBarController's moreNavigationController

[亡魂溺海] 提交于 2019-12-21 12:31:36
问题 I'm in the process of customizing the 'More' view in my app's UITabBarController. From what I see in the docs there is precious little support for customizing it. There is only a read-only property of the UITabBarController called 'moreNavigationController' that points to a UINavigationController. This allows us at least to customize it's UINavigationBar. Customizing the table view it presents in the first view controller is a little trickier. On other questions here on SO and elsewhere, I've

iOS7 Tabbar icons too big

六眼飞鱼酱① 提交于 2019-12-21 09:14:29
问题 Seems I am having difficulty with something as simple as icons. I am building an app for iOS7 only and thus, devices are retina displays (excluding iPad 2). So I made up some 60 x 60 icons for my tabbar. However these are just too big. And 30 x 30 is a little pixelated. Here is what a 60 x 60 icon looks like: Can someone tell me why this is happening? 回答1: Keep 60x60px icons but rename them as iconName@2x.png which iOS will automatically reduce to 30x30 points, roughly to half of the original

UITabBarController: UITabBarItem Updating it or Reloading it

半世苍凉 提交于 2019-12-21 05:36:08
问题 How do I update or reload the text color on the UITabBarItem? It will, only if I kill the app and re-open again. Then it will refresh the textColor on the UITabBarItem Swift 5.1, iOS 12 func handleRefreshForTabBar() { DispatchQueue.main.async { //Background self.view.backgroundColor = Theme.current.generalBackground //Images self.tabBar.tintColor = Theme.current.tabTintColor //Bar self.tabBar.barTintColor = Theme.current.tabBarTintColor } } override func viewWillAppear(_ animated: Bool) {

Go to rootView when tabBar tapped

时光怂恿深爱的人放手 提交于 2019-12-21 05:21:12
问题 I used view based app & in that i programmatically generate TabBar. Problem is: I have an Iphone application in which i have 2 tabitems with a tabbarcontroller.Inside the tabbarcontroller each viewcontroller is a navigation controller.when selecting the second tab i have a view controller.when selecting a button on that i am pushing another view controller to the self.navigation controller.and in that viewcontroller i am pushing and go like that.But the problem is when i am selecting the

Passing ManagedObjectContext to view controllers using storyboards with a root UITabBarController

最后都变了- 提交于 2019-12-21 04:52:39
问题 Using storyboards you have no easy access to the first view controller in appDelegate (though once you do prepareForSegue makes it easy to pass the ManagedObjectContext down the navigation stack. I've settled on giving each view controller (or superclass of each view controller) requiring Core Data access a moc member: @synthesize moc = _moc; @property (nonatomic) __weak NSManagedObjectContext *moc; I'm uneasy about it because it doesn't seem a very elegant way to do it - too much code. But