uitabbaritem

Activate Tab in UITabbarcontroller from other screen

假装没事ソ 提交于 2019-12-25 01:26:12
问题 I am developing an App with content that is crosslinked to other content. The App contains 5 Tabs. Each Tab has it's Tableviews and detailsviews. From the detailview of a Tab, one can proceed to other items from another tab. For Example: Tab 1 > TableView List Categories > TableView List Items > DetailView > TableView crosslinked Items > Tab 2 > DetailView (Hope that makes any sense! :D) When I activate the Tab 2 by tabbarController.selectedIndex = 1; it doesn't open the requested detailview

How can I correctly change the way a UITabBar appears using the appearance proxy?

余生长醉 提交于 2019-12-25 01:15:43
问题 Since I am developing an iOS >= 5.0 application, I am trying to change the appearance of the main UI components through the appearance proxies. When dealing with the UITabBar component, I correctly changed its tintColor to a light shade of gray trough the [[UITabBar appearance] setTintColor:] method. But doing this, the UITabBarItem s included in the bar are quite impossible to see, since they retain the old gray/white color in their title label. I tried to change their appearance through the

Update UITabBarItem badgeValue with More view

╄→尐↘猪︶ㄣ 提交于 2019-12-24 10:40:46
问题 How can I update the badgeValue of a TabBarItem when I do not exactly know the index of it? It might be in the "More" tab or on the main Tabbar depending on what the user sets.. Also if the tabbaritem is inside "More" I can only add a badgeValue to the More item right? How can I add the badge on the item itself in the tableview which is created automatically by the SDK? 回答1: Yes you can, and you don't have to know index: @implementation SomeController ... -(void)increaseBadgeValue{ NSString

UITabBarItem title in centre of title, not at bottom

心不动则不痛 提交于 2019-12-23 20:21:16
问题 I want to make place tabbaritem.title in centre of item, it's possible? I'm trying make image with text in center and create custom tabbaritem, but it looks awful.Help me please. 回答1: Try with the iOS5 Appearance Proxy: [[UITabBarItem appearance] setTitlePositionAdjustment:UIOffsetMake(0.0, -2.0)]; 回答2: Have you tried using setTitlePositionAdjustment::[UIOffsetMake(<#CGFloat horizontal#>, <#CGFloat vertical#>)] ? If that doesn't work, why don't you create your own control? Have it subclass

How to use a custom UIImage as an UITabBarItem Badge?

无人久伴 提交于 2019-12-23 19:54:17
问题 How can I add a custom UIImage as the Badge for a UITabBarItem? I.e It will show up when the badge value of the UITabbarItem is set. 回答1: Consider subclassing UITabBarItem and drawing it yourself 回答2: Sascha Paulus wrote a great class that does just this: CustomBadge2.0 You can of course use it in combination with subclassing UITabBarItem . 回答3: u can use the following custom class for CustomBadge: https://github.com/ckteebe/CustomBadge/tree/master/Classes i hope this will help you. 回答4: Can

Changing UITabBarItem image

…衆ロ難τιáo~ 提交于 2019-12-23 17:11:33
问题 I have used Storyboard to set up my UITabBarController and its corresponding ViewControllers . Whenever a tab is deselected, it is gray, when it is selected it has a green tint. I would like one of these UITabBarItems to always look the same: i.e. it always has the green tint regardless of whether it is selected or deselected. In addition, the icon image I am using for this UITabBarItem already has the green look that I want. This is important because I have tried using this method in the

My iPhone app crashes after opening it from background and selecting Tab atIndex:0

孤者浪人 提交于 2019-12-23 05:32:10
问题 I really can't figure this out. When I click a link to open Safari from within my app, browse through the webpage, then return to my app, I can open and browse two tabBarItems in my UITabBar . But, when I try to select the one atIndex: 0 , I get an EXEC_BAD_ACCESS and the following :(. Can anyone help me figure out how to make this not happen? I currently don't have any code that executes in will or didEnterBackground or Foreground . None. So the problem must be in the UIViewController for

My iPhone app crashes after opening it from background and selecting Tab atIndex:0

穿精又带淫゛_ 提交于 2019-12-23 05:32:08
问题 I really can't figure this out. When I click a link to open Safari from within my app, browse through the webpage, then return to my app, I can open and browse two tabBarItems in my UITabBar . But, when I try to select the one atIndex: 0 , I get an EXEC_BAD_ACCESS and the following :(. Can anyone help me figure out how to make this not happen? I currently don't have any code that executes in will or didEnterBackground or Foreground . None. So the problem must be in the UIViewController for

How to change the color of unselected tab bar items in iOS 7?

寵の児 提交于 2019-12-22 12:49:00
问题 Im trying to change the color of the unselected images in the tab bar, by default they are changed to gray, even if the image is another color. I already search this, but the answers are only for iOS 6 or below. 回答1: This drove me mad just recently so I wrote my own class to handle it that works with every version of iOS I've tried it on ;) Its really easy to extend to do whatever you want it to do too! GozTabBar.h: #import <UIKit/UIKit.h> #import "GozTabBarItem.h" @protocol GozTabBarDelegate

why does selecting a tabbarController index programatically doesnt call delegate method

回眸只為那壹抹淺笑 提交于 2019-12-22 06:36:01
问题 when we touch the tabbaritem of the tabbarcontroller the delegate methods are called: -(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController; - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController; but when try to do the same thing programmatically, i.e. [self.tabbarController setSelectedIndex:selectedIndexNo]; or [self.tabBarController