uitabbar

UITabbar in Xcode 6

牧云@^-^@ 提交于 2019-12-07 19:30:24
问题 I have UITabbarController with 4 tabs in iPhone 4, 4s, 5, 5S it is woking fine with tabbar item image But in iPhone 6 and iPhone 6 plus is looking wired. Is it need to put different images for both iPhone 6 and iPhone 6 plus ? How can I set this images. in iphone 6 And, iPhone 6 Plus 回答1: I ran into this same issue. The problem here is not only the different resolution, but the fact that the size of the bounds is actually wider for iphone 6 and iphone 6 plus. By running the simulator on all

UITabBarItem action not working

我只是一个虾纸丫 提交于 2019-12-07 12:47:54
问题 I am trying to create a sort of action bar so I restored to using a tab bar because it is clean and is less of a hassle. All 5 of the tabs will be doing some kind of action but with the current code I have it is not doing anything and I am unsure why. I have the UITabBarDelegate added in my class class DetailViewController: UIViewController, MKMapViewDelegate, UITabBarDelegate I have the tab bar set @IBOutlet weak var optionsBar: UITabBar! And this is the code I was hoping would print out the

What's the best way of adding a custom centre button to a tab bar?

北城余情 提交于 2019-12-07 10:47:38
问题 Many apps have a standard tab bar with a custom button in the centre which performs some special function. Some examples can be found here: http://mobile-patterns.com/custom-tab-navigation What's the best way of implementing this? 回答1: Here you can see how to implement that button. I am gonna paste the code so it stays here forever: UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height); [button

Programmatically change tabBar item?

柔情痞子 提交于 2019-12-07 02:54:17
问题 I would like to change a TabBar Item , when a User is logged in or not. For example: i have 5 different tabBar items, all created an Storyboard. Now i want to change the tarBar with index 2 (or tag == 2) when i user has no account. I would like to load a different rootViewController. The rootViewController is not already an item of my TabBar, i would load a totally different Controller. What is the best way to do this? I can simple change the icon with: self.tabBar.items![0].selectedImage =

Tab bar controller inside a navigation controller, how to push new viewcontrollers to the tabcontroller?

和自甴很熟 提交于 2019-12-06 15:54:51
问题 Design requirement: Show a list of items the user can pick from After having picked an item, bring the user to a new view with a back button. The new view should contain a list of tabs at the bottom that are not present in the first screen When clicking an item in the tabs, a new screen should appear with a back button and the tabs should still be visible at the bottom. Clicking a tab should take the user back up the hierarchy to #2. Not to the first screen. I have tried following structure:

update tab bar height in iOS 7/8 from iOS 6 - UITabBar

我只是一个虾纸丫 提交于 2019-12-06 12:58:41
问题 I am updating an app that was written for previous iOS (5/6). I have updated the icons for the tab bar; according to the Apple requirements (Icon and Image Sizes) they are 50x50p for all devices except the iphone 6 plus. Unfortunately also my tab bar is 49 pixels in height (keep still the iOS6 size) and the icons cover its entire space. This tab bar (UITabBar) was created in the Interface builder but I am not able to change "size inspector" values. iOS 6/7 Deltas values don't do anything. I

tab bar icon selected image

梦想的初衷 提交于 2019-12-06 12:05:26
问题 How to customize the selected image/icon on the tab bar? Is this possible? Pls advise. Thanks 回答1: Its possible without adding any subView. In the class where you define the tab bar set the property of the tabBarItem to ->> UITabBarItem *tabBarItem1 = [[self.tabBar.tabBar items] objectAtIndex:0]; [tabBarItem1 setFinishedSelectedImage:[UIImage imageNamed:@"campaigns_hover.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"campaigns.png"]]; Its a property of tabBarItem and u can change the

UITabBar images visible on simulator, disappear on the device

我是研究僧i 提交于 2019-12-06 11:29:35
问题 in an iPhone app, I have a UITabBar with three tabs. One has a system image, two more have custom images. These are PNGs, 30x30, palette-based, mostly transparent. These images show up fine in the simulator, but on the device, all I see is a grey gradiented square on a tab. The shapes on these images are grey to begin with, but they do show up as expected on the simulator. Any ideas, please? 回答1: The image should be white on transparent. It's in the UI design guide. In my case, it was grey on

UITabbar in Xcode 6

若如初见. 提交于 2019-12-06 11:18:59
I have UITabbarController with 4 tabs in iPhone 4, 4s, 5, 5S it is woking fine with tabbar item image But in iPhone 6 and iPhone 6 plus is looking wired. Is it need to put different images for both iPhone 6 and iPhone 6 plus ? How can I set this images. in iphone 6 And, iPhone 6 Plus I ran into this same issue. The problem here is not only the different resolution, but the fact that the size of the bounds is actually wider for iphone 6 and iphone 6 plus. By running the simulator on all different phone types I found the following: Tab bar Bounds iPhone 6 plus: 414 x 49 iPhone 6: 375 x 49 iPhone

Max number of UITabBar items allowed in iPhone SDK?

前提是你 提交于 2019-12-06 11:09:25
问题 I currently have 8 UITabBar items, all of which are editable in the More view. My question is, what is the absolute maximum number of tab bar items allowed? I understand 5 is the most that can be visible at one time; I'm looking for the most you can have period. 回答1: I don't think there is a hard limit, as long as you don't run out of memory. I've used more than 20 in the past without any problems (although having many controllers means you should be really careful when managing memory, i.e.