uitabbar

Is possible to scroll an UITabBar?

故事扮演 提交于 2019-12-13 07:05:57
问题 I've downloaded an Download Manager from App Store and noticed that the app scrolls an UITabBar,like: When the user press a button the bar walks left and show other option to the user.Is that really possible and does Apple accept these type of customization in UITabBar?If it's possible how can i do that,please provide some sample code or reference. 回答1: Yes, possible. but not using usual UITabbar . you have to create custom tabbar that behave the same. there are projects out there that you

How to switch to a tabbar item in the “More” View?

天涯浪子 提交于 2019-12-13 07:04:44
问题 I'm programming an app in objective c for Iphone/Ipad. I have some items in the "more" of the tabbar. I want to switch to one of those views. How can i do it? Normally i would use selectedIndex, but it doesn't work on the "More" tab. 回答1: To select view controller from more screen you should select more view controller first as it displayed in previous answer: [tabBarController setSelectedViewController: [tabBarController moreNavigationController]] And then perform pushViewController method

iOS code optimization

时光总嘲笑我的痴心妄想 提交于 2019-12-13 06:43:38
问题 I'm new in iOS development and this may be a very basic question- in my app i've 5 VC with UITabBarController on each VC. I'm handling tab bar item click by- - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { switch (item.tag) { case 0: { vc1 = [[VC1 alloc] initWithNibName:@"VC1" bundle:nil]; [self.view addSubview:vc1.view]; [tabbarObj setSelectedItem:[tabbarObj.items objectAtIndex:0]]; } break; case 1: { vc2 = [[VC2 alloc] initWithNibName:@"VC2" bundle:nil]; [self.view

How to make UITabbar selectionIndicatorImage change when changing orientation - Swift

半世苍凉 提交于 2019-12-13 05:49:09
问题 I uses an image for my tabbar selectionIndicatorImage. It works great in Portrait orientation. However, when I change to Landscape orientation, the selectionIndicatorImage is still using the image for Portrait. Therefore, the image's width doesn't fit my Tab bar size in Landscape. How can I fixed this problem? Thank you. 回答1: I would change the image from code depending on the orientation. Like this: // the function is called everytime bounds change override func viewDidLayoutSubviews() { let

presentViewController with the tabbar

余生颓废 提交于 2019-12-13 04:42:38
问题 I have a app which has a tabbar which is presented in most of the ViewControllers . The problem is its not showing in an viewController which i'm presenting by this code. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:songsViewController]; [self presentViewController:navigationController animated:YES completion:nil] I'm using the presentViewController instead of the pushViewcontroller , cause i want to customize the navigationBar in

UItabBarItem highlight state image

痴心易碎 提交于 2019-12-13 03:25:35
问题 I'd like to be able to change the highlighted state image on an UITabBarItem when it is selected? Is it possible to subclass and access this? or do I need to roll my own navigation code? -> start edit I didn't articulate what I was looking for earlier. I am looking for the semi-transparent white overlay reference that the device adds to the selected state/image of the UITabBar. See image! http://solomon71.com/images/UITabBarItem.png 回答1: There is no documented or supported way to set your own

UITableView scrolling doesnot scroll

被刻印的时光 ゝ 提交于 2019-12-13 02:24:19
问题 I want to develop iOS app in which i am using transparent Tababar , and having UITableView on View when i run my app, because of Transperant Tababar my UITableView gets behind Tababar and i am unable to select last row of UITableView . See: : Thanks in advance. 回答1: simple adjust table.contentInset = UIEdgeInsetsMake(0, 0, 200, 0); // try setting this value hope this helps u :) 回答2: There are 2 possiblities:- 1). Firstly, You might have forgot to set datasource and delegate of the tableview

Why is my UITabBar shifting down 20 pixels when loaded on portrait?

青春壹個敷衍的年華 提交于 2019-12-13 01:17:41
问题 I am loading a UITabBarController inside a UINavigationController . By default the UITabBar for the UITabBarController places it at the bottom of the view. By using the default option the bar is displayed correctly at the bottom position when the app is initiated on landscape. This also makes portrait display correctly at the bottom, (but only when the app is initiated in landscape mode). If I start the app on portrait, it appears to shift downwards the height of the status bar on both

How to change tab bar item text colour on focus in TVOS

允我心安 提交于 2019-12-13 00:53:20
问题 I have four item in tab bar. 1> Watch. (Black Colour) 2> On Demand. (Black Colour) 3> Search. (Black Colour) 4> Settings. (My Colour) How can i change the colour of item text in tab bar to match with its icon colour. (Right now Performance is selected in the tab bar) enter image description here How can I change the color of "1,2,3" text in tabbar to match with its icon color. (Right now Performance is selected in the tab bar) I tried to set TitleTextAttributes. UITabBarItem.appearance()

Weird positioning issue when tabBar is present

隐身守侯 提交于 2019-12-12 21:07:15
问题 We have a custom view with a UIPickerView plus toolbar (216 + 44). At init time (viewDidLoad) this custom view is pushed below the screen using the following piece of code. CGPoint newOrigin; newOrigin.x = pickerViewOutlet.frame.size.width/2; newOrigin.y = self.view.frame.size.height + ((pickerViewOutlet.frame.size.height)/2); NSLog(@"%f,%f",self.view.frame.size.height,(pickerViewOutlet.frame.size.height)/2); pickerViewOutlet.center = CGPointMake(newOrigin.x, newOrigin.y); When a button is