uitabbarcontroller

Reload uiview when pressing tab item inside initialized view

China☆狼群 提交于 2019-12-11 07:26:16
问题 I have a view controller inside a tab bar controller. When I'm "inside" the initialized view I want to be able to press the tab bar item again and redraw the view. My tabbarcontroller is created in the AppDelegate #AppDelegate.m - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { NSString *titleV = viewController.title; if (titleV == @"Random") { DetailViewController *detailViewController = [[DetailViewController alloc]

How do I resize the tab bar items in Xcode 4.3.1?

一世执手 提交于 2019-12-11 07:25:53
问题 I've been searching on how to resize the tab bar items on the "Tab Bar Controller," but obviously couldn't find anything. The reason why I want to do this is because I have exactly 6 items, and it causes the "more" item to be created whenever you have 6 or more. So 4 items show up on the bottom and a "more" item that shows the other two items when clicked. My title for all my items are short, so I want to squeeze 6 of them right below without the "more" and the only way to do that is to

Update UIViewControllers after switching of the tabbar selection

社会主义新天地 提交于 2019-12-11 07:05:32
问题 I have two view controllers in a tabbar which can both edit data. Therefore, I need to call a reload_data function whenever the user makes a switch on the tabbar. How can I catch the switch or the appearance of the viewcontroller. Somehow viewDidAppear is not called on a tabbar switch. And I do not want to use the tabbarController delegate for this, because several viewControllers are affected (and I cannot set them all as delegate). What is a good way to solve this? e.g. this didn't work: -

Multiple Navigation controllers/Tab Bar controllers on one storyboard

a 夏天 提交于 2019-12-11 06:58:25
问题 Ok guys, novice here. I have a screen shot of storyboard I'm working on and I'm running into an issue where I can't name an item on my first tab bar because it points to a second tab bar controller. First I want to ask would this be proper use or should there only be one of these "types" per project. secondly, how the heck can I name the first tab bar item? I would do it normally by clicking on the tab element in the targeted view. Here's the screen shot. 回答1: Typically you only have one

Orientation Issue with photo browser

最后都变了- 提交于 2019-12-11 06:28:15
问题 I am using KTPhotoBrowser. Can any one tell me why when I use the TabBarSample of this code in my project, I am not able to make the photos work for landscape? The photos always display in portrait mode as my project only runs in portrait. How do I solve this issue? I have added the following -(BOOL)shouldAutorotate { return YES; } in SDWebImageRootViewController.m but still no luck. Please can anyone download this and see why the TabBarSample(project) not working for the landscape ? 回答1: I

How to hide text in UITabBar

霸气de小男生 提交于 2019-12-11 06:27:44
问题 I am trying to create a tab bar with just the image, no title. How would I go about doing this? Here is how I set the image: FeedViewController.tabBarItem.image=[UIImage imageNamed:@"Describe-Home_Icon_NormalArtboard-1"]; 回答1: [FeedViewController.tabBarItem setTitle:@""]; 回答2: This can easily be done within the interface builder (storyboard or xibs). Please see the attached screenshot. You can place name of your image here and simply leave the 'Default title' space blank, as I have done here.

How to add tabbarcontroller in viewcontroller in iphone

拥有回忆 提交于 2019-12-11 06:25:30
问题 I am new to iphone development, i have created my project in view based application and i want to add tabbar controller in my view. I have added tabbarcontroller using interface builder in my view and i cannot see the tabbar in my view. Plz how can i add tabbarcontrolller in view. So plz guide me. thanks. 回答1: I'd recommend creating another app using the "Tab Bar Application" template, and then look at the differences between that and your app. 回答2: In your AppDelegate: - (void

Change tabBar height in Swift 5 for IOS 13

限于喜欢 提交于 2019-12-11 06:24:29
问题 I need to change the UITabBar height to 95. I can do that in the older version of iOS Swift. This is my code that work in the older version. override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() tabBar.frame.size.height = 95 tabBar.frame.origin.y = view.frame.height - 95 menuButton.frame.origin.y = self.view.bounds.height - tabBar.frame.size.height - 10 shadowBtn.frame.origin.y = self.view.bounds.height - tabBar.frame.size.height - 15 } 回答1: Try it in viewDidLayoutSubviews

C# Monotouch/Xamarin - Replace Entire Tab Button With Image In UITabBarController

梦想与她 提交于 2019-12-11 05:58:59
问题 Is it possible to replace the entire tab button for each tab with a different image in the UITabBarController? INSTEAD OF THIS - (Standard Default Tab Controller Appearance) DO THIS - (Custom Tab Controller Appearance Using Images) How would I go about doing this? Customization of the UITabBarController seems pretty nasty. You can change the tint colour, but that affects the colour of the tab image in it's various selected/not-selected states.... 回答1: It's not obvious. But here's how to use

Make UITabBar wait for user input before switching tab

。_饼干妹妹 提交于 2019-12-11 05:45:48
问题 I have a UITabBar with 5 tabs. When the middle tab is selected I want a UIAlertController Action Sheet to pop up, await user action and then load the new view once the user has selected from the Sheet since I need the data from the Sheet to load the view correctly. I currently have this code: extension CustomTabBarController: UITabBarControllerDelegate { func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool { guard let index =