uinavigationcontroller

Right design pattern for tabbed navigation views?

。_饼干妹妹 提交于 2019-12-30 07:42:58
问题 I've been stuck trying to puzzle this out for a couple days now, and I'll admit I need help. The root view controller of my application is a tab bar controller. I want to have each tab bar a different navigation controller. These navigation controllers have completely different behavior. So how do I set this up in terms of classes? Per Apple's documentation, I'm not supposed to subclass UINavigationViewController . So where do I put the code that drives each of these navigation controllers?

XAMARIN.IOS UITabBarController in some UIViewControllers

点点圈 提交于 2019-12-30 07:15:13
问题 I have an application (Xamarin.IOS) which start with a UIViewController (Connection view) with no TabBar. But when user Logged, I'd like to add the tabbar that I've created to other views. And vis-versa, when user logged out, I'd like to display the connection view without TabBar. I know that when I want to display the TabBar, in appDelegate, I have to initialize _window like this : _tabController = new TabController(); _window.RootViewController = _tabController; _window.MakeKeyAndVisible();

Transparent UINavigationBar

微笑、不失礼 提交于 2019-12-30 06:04:30
问题 Am newbie to ios and I found this solution on making the UINavigationBar Transparent. Where in my project files can I put this code [self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self.navigationBar.shadowImage = [UIImage new]; self.navigationBar.translucent = YES; So that it is applied in my entire project where navigation controller is being used. 回答1: Put in your viewDidLoad function of your rootViewController this code: Objective-C: [self

Transparent UINavigationBar

情到浓时终转凉″ 提交于 2019-12-30 06:04:14
问题 Am newbie to ios and I found this solution on making the UINavigationBar Transparent. Where in my project files can I put this code [self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self.navigationBar.shadowImage = [UIImage new]; self.navigationBar.translucent = YES; So that it is applied in my entire project where navigation controller is being used. 回答1: Put in your viewDidLoad function of your rootViewController this code: Objective-C: [self

Pass a variable between lots of UIVIewControllers

白昼怎懂夜的黑 提交于 2019-12-30 04:36:12
问题 In my iPhone app, there is a setup assistant which helps users to input a lot of data. It's basically a UINavigationController with lots of UIViewControllers in it. Now, at a certain point, I want to access a variable that the user entered in the first UIViewController he saw. I could pass the variable between every UIViewController with a setter method, but I guess there is an easier way. 回答1: You can declare global or class variables in C style if you want to. If you want the same variable

iAd below UITableViewController inside UINavigationController

天大地大妈咪最大 提交于 2019-12-30 00:41:06
问题 I'm building an app for a blog site. I have a UINavigationController with a UITableViewController as it's root view. I laid this out in a storyboard no problem, but I'm trying to drag an iAd view to the bottom of the screen and xcode will not let me add it. It looks like I have to switch from a subclass of UITableViewController to a subclass of UIViewController, and just put my delegate and datasource methods in my subclassed UIViewController. This seems wrong to me. I'm just trying to end up

global ADBannerView in iPhone app

只愿长相守 提交于 2019-12-30 00:37:13
问题 Is it possible with a standard UINavigationController-rooted app, to have a single ADBannerView visible at the bottom of the screen, below the view hierarchy? That is, without modifying each view-controller/view that can be pushed to the root UINavigationController, can I have a global ADBannerView be visible? I'm not sure how to set this up, either in IB or in code. Help? I see similar questions with vague answers. I'm looking for a concrete example. 回答1: EDIT: The better way to do this in

Showing/hiding navigation bar with smooth animation

白昼怎懂夜的黑 提交于 2019-12-29 10:36:30
问题 I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation bar: MyAppAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.navigationController.navigationBar.hidden = NO; Once I leave the root controller, the navigation bar will jerk into place and lay on top of the tableview, rather than

How to place a UIImage in Navigationbar such that its a logo?

断了今生、忘了曾经 提交于 2019-12-29 09:49:40
问题 I would like to place a logo/image in the left side of NavigationBar . I try this in codes, but it is not worked properly. UIImage *logo = [UIImage imageNamed:@"logo.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage: logo]; imageView.frame = CGRectMake(2, 2, 40, 40); self.navigationItem.titleView = [[UIImageView alloc] initWithImage:logo]; I try with view to be placed first then place image as UIImageView but alignment is not good. And moreover view appears to be white space

Setting action for back button in navigation controller

浪子不回头ぞ 提交于 2019-12-29 08:32:49
问题 I'm trying to overwrite the default action of the back button in a navigation controller. I've provided a target an action on the custom button. The odd thing is when assigning it though the backbutton attribute it doesn't pay attention to them and it just pops the current view and goes back to the root: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle: @"Servers" style:UIBarButtonItemStylePlain target:self action:@selector(home)]; self.navigationItem.backBarButtonItem =