uitabbarcontroller

Unbalanced calls to begin/end appearance transitions for UITabBarController

你说的曾经没有我的故事 提交于 2019-12-17 15:17:05
问题 I have an UITabBarController, when initial run, I want to overlay a login view controller but received error. Unbalanced calls to begin/end appearance transitions for < UITabBarController: 0x863ae00 >. Below is the code. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; //

iOS Swift Navigate to certain ViewController programmatically from push notification

喜你入骨 提交于 2019-12-17 14:56:18
问题 I use push notifications to inform the user about different types of events happening in the app. A certain type of push notification should open a special viewcontroller (f.e a notification about a new chat message does navigate to the chat on click) To achieve this, i tried the following code inside my app delegate: func applicationDidBecomeActive(_ application: UIApplication) { if var topController = UIApplication.shared.keyWindow?.rootViewController { while let presentedViewController =

Shared iAd banner for UITabBarController based app using XCode 4 with storyboard

孤街浪徒 提交于 2019-12-17 14:48:52
问题 Storyboard iAd Tab Bar Controller sample project 1: Download sample project for Xcode 4.2 2: Make the banner visible above the Tab Bar from every view 3: post answer 4: recieve bounty 5: make other people happy, I will tutorialize it. No place existing tutorial for this important step atm. 回答1: It's fairly simple actually. Just create a new banner view controller for each tab that will be the parent view controller for each tab in your storyboard. Then drag in a Container View object into

How to disable the edit button that appears in the more section of a UITabBarController?

会有一股神秘感。 提交于 2019-12-17 10:24:09
问题 In my application (based on the Tab bar application XCode template) I use a UITabBarController to display a list of different sections of the application that the user can access. By default, the UITabBarController displays a 'More' button in the tab bar when there are more than 5 items. Also, it allows the user to select the items that he want to be visible in the tab bar. Currently I can't implement saving and loading the state of the tab bar controller, so I want to disable the 'Edit'

How add tabs programmatically in UITabBarController with swift?

北城以北 提交于 2019-12-17 09:43:09
问题 How to create programmatically tabs from any class extended by UIViewController: class DashboardTabBarController: UITabBarController { override func viewDidLoad() { //here } ... } 回答1: UPDATE SWIFT 5 One example of how to create an UITabBarController programmatically could be like this: First we create the UIViewControllers that will be the content for each tab of the tab bar interface. For this example we only create one very simple. class Item1ViewController: UIViewController { override

What size should TabBar images be?

两盒软妹~` 提交于 2019-12-17 08:10:12
问题 I have icons for a tabBar of size 100. I checked at Apple's Human Interface Guidelines and it says the image size should be 30x30 / 60x60 . But as the height of tab bar controller is 50, I kept the size of the image at 50x50 . Now, when I run the project, I see the ugly design below: Any idea what size images I should use so that the design will be perfect? Note: I am not writing text also (e.g. Home, Search, etc). The text of the tab button is there in the image itself. 回答1: 30x30 is points,

Is it possible to hide the tabbar when a button is pressed to allow a full screen view of the content?

≯℡__Kan透↙ 提交于 2019-12-17 07:13:05
问题 I have a UITabBar in the detail view of my navigation based application. I am storing text and images in a tableview and would like the user to be able to tap on a cell to hide the navigation controller and the tabbar for full screen viewing of the content. I found this code for hiding the top bars, but it does not seem as easy to hide the tabbar. [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; [self.navigationController setNavigationBarHidden:YES animated:YES]; Does

How to change the Color of text in UITabBarItem in iOS 5

这一生的挚爱 提交于 2019-12-17 07:13:04
问题 with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ? EDIT:working solution [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, nil] forState

How to change the Color of text in UITabBarItem in iOS 5

末鹿安然 提交于 2019-12-17 07:12:18
问题 with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ? EDIT:working solution [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, nil] forState

How to change inactive icon/text color on tab bar?

情到浓时终转凉″ 提交于 2019-12-17 06:24:13
问题 How can I change inactive icon/text color on iOS 7 tab bar? The one in gray color. 回答1: In every first ViewController for each TabBar: - (void)viewDidLoad { [super viewDidLoad]; // changing the unselected image color, you should change the selected image // color if you want them to be different self.tabBarItem.selectedImage = [[UIImage imageNamed:@"yourImage_selectedImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; self.tabBarItem.image = [[UIImage imageNamed:@"yourImage