FAQ Database Discussion Community


Check if tabBar is nil

ios,objective-c,swift,tabbar
I'm trying to see if my TabBar is nil. In Objective-C I would do so: if(self.tabBar != nil){ } if I try to do this to me in swift returns this error: 'UITabBar' is not a subtype of 'NSString' This is the code that I have to write in whole...

Tabbar icon not able to see

ios,tabbar
I put this icon onto tabbar, but on the device only a grey rectangle I can see. Should I transform somehow my image to see it? ...

What can possible cause image look ugly in tab bar iOS?

ios,image,tabbar
I have 2 images. The first one (@2x: 50x50, 72 pixels/ inches) is like this: It look so ugly in Tab Bar: The second one (@2x: 48x42, 72 pixels/inches) is like this: Even it is smaller, it look good in Tab Bar: I cannot see the different between the 2...

Remove TabBar item in Swift

ios,swift,uitabbarcontroller,tabbar
I currently try to find a way to remove while run the app a TabBar Item, i found a way to enable or disable it but not to complete remove it. For disable it i do: In ViewDidLoad if let tabBarItem = self.tabBarController?.tabBar.items?[3] as? UITabBarItem { tabBarItem.enabled = false }...

Tab Bar Controller .. Item Title

ios,tabbar
i have 3 Items in my TabBar, and i will load a saved Title for this Items... this works with this Code in ViewDidLoad.. NSString *loadstring = [defaults objectForKey:@"char1_class"]; NSString *charleveltitel = [defaults objectForKey:@"char1_class_level"]; NSString *titel = [NSString stringWithFormat:@"%@ %@", loadstring, charleveltitel]; self.navigationItem.title = titel ; [[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:NSLocalizedString(titel, @"comment")];...

How can I refresh view every time when a tab bar item is clicked?

ios,objective-c,xcode,tabbar
I have an UITabBarController(empty) which have 2 subView. These two subView are tableView(get data from database). I want to refresh view every time when a tab bar item is clicked(get new data from DB). I search many method on Internet. Some said use the viewwillappear. But did work. Can anyone...

how to jump to Fragment upon selection of respective tab bar

java,android,android-actionbar,tabbar,viewpagerindicator
//SampleTabsWithIcons.java public class SampleTabsWithIcons extends FragmentActivity { private static final int[] ICONS = new int[] { R.drawable.events, R.drawable.rss, R.drawable.user, R.drawable.bell, R.drawable.search }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.simple_tabs); FragmentPagerAdapter adapter = new GoogleMusicAdapter(getSupportFragmentManager()); ViewPager pager =...

Setting the background color of a specific tab bar Item and making it a seperate item

ios,tabbar
Like the Instagram app, i would like to have my center tab bar item a specific color. I understand this is how I would set the selected image: [[UITabBar appearance] setSelectionIndicatorImage:[AppDelegate imageFromColor:[UIColor colorWithRed:0.484 green:0.403 blue:0.884 alpha:1] forSize:CGSizeMake(64, 49) withCornerRadius:0]]; But how would I keep the 3rd tab's background to always...

TabBarItem background color of selected item in iOS

ios,uitabbarcontroller,uitabbar,tabbar
How can I change background color of selected tabBarItem to other color? To red like on my attached image ...

How to add @2x, @3x sizes images for a tab bar icon in storyboard

swift,ios8,storyboard,tabbar
I can't add multiple images with different size for a tab bar icon in storyboard. How can i do this ?