uitabbarcontroller

Showing two UIViewController at the same time

邮差的信 提交于 2019-12-11 18:49:47
问题 I have two UIViewControllers which I sometimes need to show at the same time. Imagine ViewController A only has one button and is otherwise transparent. Once I touch the button I would like ViewController B (which is green) to fade in and do other custom animations, but ViewController A (and the button) needs to be still shown on top of B. Once the fade/animation etc. are over, only ViewController B (green) is visible. My questions: 1) What is the best setup? UINavigationController with

How are the 2 View Controllers wired to the tabBarController in iPhoneRecipes

扶醉桌前 提交于 2019-12-11 16:59:32
问题 I am learning iPhone programming by reviewing the iPhone Recipes sample application. I am puzzled with how the two view controllers are wired to the tab bar. If they are wired in the XIB, can anyone explain how it is done or where I can get more visually aided details on connecting things in the XIBs. This is my starting point in the learning process: - (void)applicationDidFinishLaunching:(UIApplication *)application { recipeListController.managedObjectContext = self.managedObjectContext;

IOS iPad application bottom strange white area

感情迁移 提交于 2019-12-11 16:22:42
问题 I developed iPad tabbar application. I also use custom tabbar on left side. Bu Tab bar has white background along edges in landscape mode and also portrait mode. This area could not delete any of the method. 回答1: It sounds like the sizes you're using in your nib file don't match the layout in your app. You'll need to set the autoresizing mask of your views so that they resize correctly at runtime. You can change the autoresizing masks in the nib by opening the right-hand pane; selecting the

I am not able to get text field value in to next tab viewController. I am using TabBarController with two tabs

时间秒杀一切 提交于 2019-12-11 16:13:25
问题 I have a TabBarController with two tabs; first is InputViewController and second one is TableviewController . Input view controller has two text fields when I enter the text, after that I want to receive that text filed value in to TableviewController (in the next tab). It does not receive the value. 回答1: Try to use this concept..... Declare two variables in Second tab that is Tableviewcotroller.. For exa.. NSString *strname; NSString *straddr; @property and @synthesize both... Now, in your *

Getting the name of a Controller

邮差的信 提交于 2019-12-11 15:48:47
问题 I have an iPhone application with a TabBarController. I can access the current ViewController with [appDelegate.myTabBarController selectedViewController] But how can I get the name of this controller? For example the name of the selected ViewController is "TestViewController". How can I get this string/name? I want to check if the current ViewController is "TestViewController". Thanks a lot in advance & Best Regards. 回答1: You can do this in this manner: if([[appDelegate.myTabBarController

how to use UITabBarController's shouldSelectViewController delegate method

吃可爱长大的小学妹 提交于 2019-12-11 15:37:06
问题 I have a tabbar-based application (tabbar controller is added in window itself) and all the navigation controller with their respective root view controllers are being set in window's xib. I have 4 tab bar items. Suppose I click on item 1, then the root view controller for that item is being shown to me. This root view contains a table with 5 cells. If I click on a row, then a new view is pushed onto the navigation stack. Now, this pushed view has a button clicking on which will again push a

Color of status bar does not change as my navigationbar

拈花ヽ惹草 提交于 2019-12-11 15:28:36
问题 I bumped into an odd problem. Suddenly the color of my status bar does not change color to the same as my navigationbar in my tabbarcontroller. I've tried setting the color of the navigationbar self.navigationController!.navigationBar.barTintColor = UIColor(red: 57, green: 79, blue: 116) self.navigationController?.navigationBar.tintColor = UIColor.white self.navigationController?.navigationBar.isTranslucent = false self.navigationController?.navigationBar.titleTextAttributes =

Implementing custom UITabBarController without private APIs

人盡茶涼 提交于 2019-12-11 15:04:41
问题 After searching through several question on StackOverflow I've found out that there is only 1 major project for creating custom UITabBar called BCTabBarController . The description to it says: There are several problems with using the standard UITabBarController including: It is too tall, especially in landscape mode The height doesn't match the UIToolbar It cannot be customized without using private APIs Nevertheless, I've found this strange project on GitHub with the tutorial here that uses

Embedding View Controller in Tab Bar Controller removes navigation items

这一生的挚爱 提交于 2019-12-11 14:21:12
问题 I have a View Controller which is already embedded in a Navigation Controller as such: The Table View Controller has a programatically added title and button which work fine: override func viewWillAppear(_ animated: Bool) { navigationItem.title = "The Harrovian" } override func viewDidLoad() { super.viewDidLoad() navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .refresh, target: self, action: #selector(refresh)) I wanted to embed the Table View Controller in a Tab View

Dismiss current navigation controller when clicked tab bar

妖精的绣舞 提交于 2019-12-11 14:18:13
问题 I have got a tab bar controller and in home view controller i have a navigation controller. -Tab Bar Controller -- HomeVC --- VC1 navigation push -> VC2 In VC1 navigation bar is not hidden but inside VC2 is hidden. And im controlling it with viewwillappear and viewwilldisappear. override func viewWillAppear(_ animated: Bool) { navigationController?.navigationBar.barStyle = .blackTranslucent } override func viewWillDisappear(_ animated: Bool) { navigationController?.navigationBar.isHidden =