uitabbaritem

Sliding UITabBarItems in UITabBarController

与世无争的帅哥 提交于 2019-11-29 08:20:39
I have a UITabBarController as my rootController with 8 UITabBarItems . and I want to show just 4 UITabBarItems in my screen. By default all my other tab bar items appear in a small tabBarItem called "More" and you can select the other 4. But I have seen some apps that implement a sliding UITabBarItems with a slide icon instead of a "More" icon. How can I show just 4 at a moment, and I slide the TabBarItems, and so that I can select the other tab bar items ? ~ Something like this ~ And then I can slide to the next 4 sets by dragging It would be helpful if someone could point me in the right

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

Swift setting Badge Value for UITabBarItem

会有一股神秘感。 提交于 2019-11-29 02:56:54
I'm attempting to add a badge alert label like the one in the screenshot attached. I've tried to search for titles, labels uitabbar items but I'm stuck. Any suggestion is appreciated. Xcode 7.2.1 Swift 2.1.1 You just have to set the badgeValue for your desired UITabBarItem as follow: tabBarController?.tabBar.items?[4].badgeValue = "1" // this will add "1" badge to your fifth tab bar item // or like this to apply it to your first tab tabBarController?.tabBar.items?.first?.badgeValue = "1st" // or to apply to your second tab tabBarController?.tabBar.items?[1].badgeValue = "2nd" // to apply it to

Change tintColor of unselected UITabBarController item title and background image

ぐ巨炮叔叔 提交于 2019-11-29 00:59:12
问题 How can I change the tintColor of an unselected UITabBarItem title and background image iOS 8? The default color for an unselected state is a light gray color, but it does not show on my darkish shade UITabBar background I'd like my unselected state to have a color of [UIColor blackColor] Inside my app delegate didfinishlaunchingwithoptions: I have UIImage *deselectedE = [[UIImage imageNamed:@"mincraft_axe_green_32.png"] imageWithRenderingMode:UIImageRenderingModeAutomatic]; UIImage

How to set UITabBarItem's unselected tint, ***including system items*** (iOS7)

我的未来我决定 提交于 2019-11-28 20:29:28
( NOTE: I see there are several similar questions on SO, but none of them seem to get at my specific issue of wanting to change the unselected appearance of both custom and system UITabBarItems.) I'm working in iOS7. I have a UITabBar with some buttons. Some of them are my buttons, some are system buttons. Example: UITabBarItem *searchButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemSearch tag: navSearchItem]; UITabBarItem *bookMkButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemBookmarks tag: navBookmarksItem]; UITabBarItem *homeButton = [

How to add small red dot in UITabBarItem

橙三吉。 提交于 2019-11-28 17:19:51
How to add red dot on the top right side of the UITabBarItem . I have searched a while and some guys said this can be done setting Badge Value of the UITabBarItem .But when I give it a try and set badge value to empty space " ",the red dot is somewhat big.How can I get a proper one?Big thanks. If you want to avoid traversing subviews & potentially dangerous hacks in general, what I've done is set the badge's background colour to clear and used a styled bullet point to appear as a badge: tabBarItem.badgeValue = "●" tabBarItem.badgeColor = .clear tabBarItem.setBadgeTextAttributes(

UITabBar change background color of one UITabBarItem on iOS7

岁酱吖の 提交于 2019-11-28 12:17:38
Can I change the background color of a specific UITabBarItem in a UITabBar ? I know how to change all the background of the selected background, using: [[UITabBar appearance] setBarTintColor:[UIColor redColor]]; [[UITabBar appearance] setTintColor:[UIColor blueColor]]; [[UITabBar appearance] setSelectedImageTintColor:[UIColor yellowColor]]; But can it be done for only one item without subclassing? Thanks You can add a subview to the parent tabBar, and set a background color on the subview. You can use the tabBar frame dimensions to calculate the offset and width of your tabBarItem, and then

Customize the More UIBarButtonItem in UITabBar

一个人想着一个人 提交于 2019-11-28 11:51:00
Since iOS 5 Apple provided an API to customise the UITabBarItems in the UITabBar object. I am refering specifically to the following selector: setFinishedSelectedImage:withFinishedUnselectedImage: It all works great for regular buttons but I can't seem to customise the "More" button to match the style of the other ones. This is what I am doing: tabBarController.viewControllers = tabBarControllerArray; tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor blackColor]; UITabBarItem *more = tabBarController.moreNavigationController.tabBarItem; if ([more respondsToSelector:

How to remove programmatically a tab bar item created in parent class NIB file?

感情迁移 提交于 2019-11-28 11:03:26
Within my iPhone application I have a common tab bar with three tabs that is presented from several views after pressing a button. The approach I followed was the workflow of Tweetie application, described in Robert Conn post . Note that the main controller is a navigation controller; the tab bar is placed in a view controller's NIB file of the navigation stack, and the effect of switching between tabs is handled in a delegate didSelectItem method. @interface GameTabBarController : UIViewController<UITabBarDelegate> { UITabBar *tabBar; UITabBarItem *lastGameTabBarItem; UITabBarItem

Tab Bar Icon Size

大兔子大兔子 提交于 2019-11-28 09:45:48
问题 Apple says: Depending on the device and orientation, the system displays either a regular or compact tab bar. Your app should include custom tab bar icons for both sizes. Unfortunately, they fail to specify when you get which. Also I might include those images for both sizes, but will the system switch between them automatically (how?) or do I have to do it myself? 回答1: You should not do this yourself system can do it automatically. here is Apple Human Interface Guidelines, where you can find