uitabbar

IOS 7 hide tabbar issue

我怕爱的太早我们不能终老 提交于 2019-12-10 16:48:46
问题 Hide tabbar in IOS7 shows informal behaviour When I use self.tabBarController.tabBar.hidden = YES; Above code hides the tabBar, but my view from bottom does not remain interactive But when I uses this just before pushing viewController in navigation someViewController.hidesBottomBarWhenPushed = YES [self.navigationController pushViewController:someViewController animated:YES]; It hides tabbar as well as view from bottom is also interactive. but problem in this case is, when we pop

Can't dismiss the email composer view in iPhone?

限于喜欢 提交于 2019-12-10 16:10:27
问题 I am new to iphone development.I have created a tabbar based application . In the first i want the email composer to be displayed. I am able to display it but the cancel and send button are not working,I don't know where do i go wrong .Please help me out. Here is my code. - (void)viewDidLoad { [super viewDidLoad]; [self displayComposerSheet]; } -(void)displayComposerSheet { picker = [[MFMailComposeViewController alloc] init]; [[picker navigationBar] setTintColor:[UIColor blackColor]]; picker

viewDidAppear for tabbar based apps

戏子无情 提交于 2019-12-10 14:47:24
问题 I'd like to do something when a particular tab appears. Meaning, the user has clicked the tab view's tab button. viewDidAppear doesn't fire when this happens. How else can I hook into the tab click event? 回答1: You can implement this - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{ [viewController viewDidAppear:YES]; } in your Tab Bar Delegate, so your viewDidAppear method will be called properly. 回答2: Implement

How do you customise the title on a UITabBarItem?

大兔子大兔子 提交于 2019-12-10 12:56:23
问题 When using the method initWithTabBarSystemItem to create a UITabBar object is there a way to set the title? I've tried setting the title property (on the viewController and tab bar item) afterwards but it doesn't seem to make a difference. I know about the initWithTitle: image: method but I want to use one of the system icons with a custom title. 回答1: If yo are using the systemItem you can't customize it, you will have to make a custom Item, and use the same or similar artwork... you could

UITabBar wont hide

亡梦爱人 提交于 2019-12-10 12:07:30
问题 I have a UINavigationController in a UITabBarController, and I can't seem to get a pushed viewController's tabBar to hide. I am using the following code to hide it: Before it gets pushed: tpsv.hidesBottomBarWhenPushed = YES; tpsv.tabBarController.hidesBottomBarWhenPushed = YES; viewWillAppear: self.tabBarController.tabBar.hidden = YES; AppDelegate *del = (AppDelegate *)[[UIApplication sharedApplication] delegate]; [[[del tabController] tabBar]setHidden:YES]; But none of the above work. If you

UIToolBar on top of UITabBar?

你说的曾经没有我的故事 提交于 2019-12-10 09:26:49
问题 When in the Camera Roll section of the Photos app, you can click the top right button to edit the photos. This replaces the bottom tab bar with three new buttons which are in a UIToolBar. I would like to do something similar, but I cannot get my UIToolBar to be on TOP of the tab bar. Is there a way to specify the layer order? Or do I need to do something different? 回答1: You may be able to add the toolbar as a subview of your key window: [[[UIApplication sharedApplication] keyWindow]

iOS 7: UITabBarItem badge z-index

…衆ロ難τιáo~ 提交于 2019-12-10 02:21:52
问题 I'd like to show a UITabBarItem badge above the selectionIndicatorImage . There are 3 screenshots: Screenshots Light gray color is the selectionIndicatorImage . Yes, badge looks good. When I touch up inside at the cloud icon UITabBar become: It's wrong.. I'd like to show badge above the selection image. If there is no icon for UITabBar - it looks good. How can I fix this issue? Thanks in advance. Edited I add icons in the storyboard. For badge I've made the code: UITabBarItem *cartTabBarItem

Remove UITabBarItem

风流意气都作罢 提交于 2019-12-09 12:53:52
问题 How can I remove a UITabBarItem from a UITabBar ? I haven't tried anything, because I haven't found anything from Google searches or the documentation for UITabBar , UITabBarController , or UITabBarItem . Thanks in advance! :) 回答1: UITabBar has an NSArray collection of items. Since the items property is an NSArray and not an NSMutableArray, you'd have to construct a new NSArray from the existing one devoid of the object you want to remove, then set the items property to the new array. /*

How to remember last selected tab in UITabBarController?

喜欢而已 提交于 2019-12-09 05:21:41
问题 I'm trying to make my app remember which tab was last being viewed before the app quit, so that the app opens up to the same tab when it is next launched. This is the functionality of the iPhone's phone function: how can I do this? 回答1: In the UITabBar's Delegate, overwrite - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item and store item 's index in NSUserDefaults. Next time your app starts, read it from there, and set it back to being selected. Something like this: -first,

iOS 5: UITabBarItem setFinishedSelectedImage:withFinishedUnselectedImage: not working / ignored

你。 提交于 2019-12-09 01:47:16
问题 As per Apple docs I'm trying to set custom finished selected and unselected images on a UITabBarItem like so: ... DetailViewController *vc1 = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil]; UITabBarItem *vc1i = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemTopRated tag:100]; [vc1i setFinishedSelectedImage:[UIImage imageNamed:@"tab_bar_item_selected.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"tab_bar_item_normal.png"]]; [vc1 setTabBarItem