uinavigationcontroller

Set view controllers property before pushViewController

对着背影说爱祢 提交于 2019-12-31 17:22:24
问题 In my app I've added a label to a view, connected it to an outlet but nothing shows up when I first assign this outlet from another view controller and then call pushViewController to display it. Here's the code before pushing next view that display the label: CustomViewController *vc = [[CustomViewController alloc] init]; vc.lbl_price.text = self.label_price.text; // lbl_price is defined as a property in CustomViewController and label_price is defined in current view controller [self

Android UINavigationController-like feature

﹥>﹥吖頭↗ 提交于 2019-12-31 11:36:27
问题 On the iPhone I use a Navigation Controller to push and pop Views from. Very handy. Is there an equivalent in Android? 回答1: Typically in android, each view is displayed in its own Activity. You can read about activities in the application fundamentals documentation. To move to a new Activity, or view, you use an intent. If you haven't done so yet, I'd highly recommend reading through those introductary android docs. They aren't too long, and do a good job of explaning the basic program

Custom navigation bar

旧巷老猫 提交于 2019-12-31 08:15:22
问题 I was crawling Dribble and found the attached design. I was wondering how to do a custom navigation bar like this. I mean how create the navigation bar once and reuse it implicitly for every view controllers. I was thinking about having a kind of root view controller and inherit for other view controllers, but I don't know how to do this. Any idea or link will be appreachated! Cheers. Cyril 回答1: Thanks to iOS5 you are now able to customise the appearance of a UINavigationBar without having to

How to enable swipe gesture when navigation bar is hidden?

偶尔善良 提交于 2019-12-31 05:22:12
问题 I've been trying to solve this issue for quite some time and cant figure it out. I have the current set up: In each view controller I hide the navigation bar like so: self.navigationController?.setNavigationBarHidden(true, animated: true) The issue is I loose the swipe gesture on the view controllers that the navigation bar is hidden. I need to have the animation enabled and cannot use: self.navigationController?.navigationBar.isHidden = true self.navigationController?.isNavigationBarHidden =

Change color of UINavigationController back button

时光毁灭记忆、已成空白 提交于 2019-12-31 03:27:12
问题 I'm having problems trying to figure out how to change the color of the buttons on the navigation controller. Previously I had used the following: [[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:226/255.0 green:66/255.0 blue:66/255.0 alpha:0.0]]; and this worked, but I added a new view with a toolbar, and the tool bar button images will not show. If I remove the global coloring, the tool bar items show just fine. I've tried setting the tint color on both the leftBarButtonItem

how to add uinavigation controller in a view based application

妖精的绣舞 提交于 2019-12-31 03:05:41
问题 I wanted to add a navigation controller to a view based application . how can we do this both programmatically and using xib file.. 回答1: If you need to incorporate a navigation controller in your uiviewcontroller you need to initialize it as it follows UIViewController *yourViewController = ... UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:yourViewController]; [self presentModalViewController:navController animated:YES]; //you need to

iOS Universal app seems slightly zoomed in on phone

耗尽温柔 提交于 2019-12-30 19:52:52
问题 I have an iPad app that I'm converting to a universal app to show on phones. It has both a tab bar and a navigation bar, and my problem is that they are both way too big on the phone. I could swear I heard Paul Hegarty (from the iTunes U class from Stanford on Swift app development) mention a switch or trick somewhere that would cause the bars to adapt to the iPhone, but I can't find it. Here are screenshots of my apps bars, vs the Photos app in the iPhone 6 simulator to show what I'm talking

iOS Universal app seems slightly zoomed in on phone

血红的双手。 提交于 2019-12-30 19:50:31
问题 I have an iPad app that I'm converting to a universal app to show on phones. It has both a tab bar and a navigation bar, and my problem is that they are both way too big on the phone. I could swear I heard Paul Hegarty (from the iTunes U class from Stanford on Swift app development) mention a switch or trick somewhere that would cause the bars to adapt to the iPhone, but I can't find it. Here are screenshots of my apps bars, vs the Photos app in the iPhone 6 simulator to show what I'm talking

How to get a uinavigation bar back button to return to anthother view controller

浪子不回头ぞ 提交于 2019-12-30 11:37:12
问题 How would I go about having a UINavigation controller navigate not to the previous view but the view before that. Basically I would like it to jump back 2 places instead of the default one. This is unconventional I'm sure, but I just need to do it for now. self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStyleBordered target:nil action:nil] autorelease]; thanks for any help. 回答1: Set: self.navigationItem.backBarButtonItem = [[

Give a top inset to UIRefreshControl

孤者浪人 提交于 2019-12-30 08:02:20
问题 I use an UIRefreshControl like it (without an UITableViewController) : UIRefreshControl *refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(viewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged]; [self.table addSubview:refreshControl]; Problem is the refresh wheel is positioned below the UINavigationController's translucent bar (ios7). There is only a few topic on this problem on StackOverflow. And they didn't bring any valuable solution to