uitabbarcontroller

Touch and pull down a view

折月煮酒 提交于 2019-12-18 11:14:18
问题 I have a uiview at the top of the interface (below the status bar) that only the bottom part of it is shown. Actually, I want to make the red uiview to slide down to be entirely shown by drag such as the notificationcenter in the native iOS and not just by taping a button. What should I use to "touch and pull down" the uiview so it could be shown entirely ? 回答1: Make a subclass of UIView . Override touchesBegan:withEvent and touchesMoved:withEvent . In the touchesBegan perhaps make a visual

TabBarController and SplitViewController

孤街醉人 提交于 2019-12-18 10:57:16
问题 i want my splitviewController to be displayed in within a TabBarController . Unfortunately, I firstly decided to just have a SplitViewController and chose apple's template. Now i am in the inconvenient position not knowing how to add it to a tab bar. I tried several stuff that was explained here on StackOverflow but the best result was a black screen with a tab bar below it :-( I am just struggling to find a nice and simple way. Code of my Appdelegate : - (BOOL)application:(UIApplication *

Setting the default tab when using storyboards

痞子三分冷 提交于 2019-12-18 10:09:04
问题 Can anyone please tell me how to set the default tab when using storyboards in iOS. I can't seem to figure out how to accomplish this. Thank you 回答1: You can use one of these two methods: tabBar.items = tabBarItems; tabBar.selectedItem = [tabBarItems objectAtIndex:0]; or a direct method from the object [tabBar setSelectedItem:myUITabBarItem]; or you can combine them to do this: tabBar.items = tabBarItems; [tabBar setSelectedItem:[tabBarItems objectAtIndex:0]]; but i havent tested that method

IOS perform segue from tab bar item

寵の児 提交于 2019-12-18 09:38:29
问题 I have a Tab bar controller with 2 items. The first item is a VC which contains a table view. Clicking on a cell, performs a segue to some other view controller (not an item on the tab bar controller). The problem is that it removes the tab bar when segue completes. How can I just replace the item 1 with other VC and still keep the tab bar in the bottom? 回答1: You need to embed your Item1VC to NavigationController so that when you push from ItemVC to MoviesViewController it will not remove the

Apple Mach-O Linker Error Parse

被刻印的时光 ゝ 提交于 2019-12-18 08:58:44
问题 I recently added the iOS Parse Framework to my Xcode 5 project. I am getting 10 errors now... None from code. They are all Apple Mach-O Linker Errors. I took the framework out and the errors went away. I am using the latest Parse.framework, so I do not know why I am getting these errors. I also have another question, now that I updated to Xcode 5.1, when ever I use the UITabBarController or just want to add a tab bar to a ViewController... I gets all weird. The entire bar turns a solid grey..

Detect UITabBar Selected Index/ Item Changes that is set Programmatically

两盒软妹~` 提交于 2019-12-18 05:39:06
问题 I would like to know how do we detect when the selected TabBar Item or Index is changed when the changes is done programmatically ? self.tabBarController.selectedIndex = 1; This two delegate function only detect changes when the tabBar Item was selected by user. It does not fire when the changes to the selectedIndex was done programmatically. func tabBarController(tabBarController: UITabBarController, didSelectViewController viewController: UIViewController) { println("tabBarController

Push another View in UINavigationController?

北城余情 提交于 2019-12-18 04:21:56
问题 How to push a view using a button in a navigation controller? I tried to follow this example: http://www.cimgf.com/2009/06/25/uitabbarcontroller-with-uinavigationcontroller-using-interface-builder/ This is exactly what I need, I have an UITabBarController with 4 tabs and one of them is an UINavigationController . I want to push that view containing the navigation controller from the first view- which is a simple UIView . It doesn't work, I tried also with a programmatically created button and

UINavigationController navigation stack problems in landscape mode

别等时光非礼了梦想. 提交于 2019-12-18 04:03:46
问题 I have an iPhone application that I am currently converting to a universal binary to work with the iPad. I have successfully implemented everything I need in terms of layout so that full landscape functionality is now supported in my app (previously I primarily used portrait mode to display content). But, I have one strange problem, and it ONLY occurs in landscape mode: when I push a view controller onto the stack, it takes two taps on the back button to return to the previous view controller

UINavigationController navigation stack problems in landscape mode

爷,独闯天下 提交于 2019-12-18 04:03:07
问题 I have an iPhone application that I am currently converting to a universal binary to work with the iPad. I have successfully implemented everything I need in terms of layout so that full landscape functionality is now supported in my app (previously I primarily used portrait mode to display content). But, I have one strange problem, and it ONLY occurs in landscape mode: when I push a view controller onto the stack, it takes two taps on the back button to return to the previous view controller

Swift setting Badge Value for UITabBarItem

∥☆過路亽.° 提交于 2019-12-18 03:02:23
问题 I'm attempting to add a badge alert label like the one in the screenshot attached. I've tried to search for titles, labels uitabbar items but I'm stuck. Any suggestion is appreciated. 回答1: Xcode 7.2.1 Swift 2.1.1 You just have to set the badgeValue for your desired UITabBarItem as follow: tabBarController?.tabBar.items?[4].badgeValue = "1" // this will add "1" badge to your fifth tab bar item // or like this to apply it to your first tab tabBarController?.tabBar.items?.first?.badgeValue =