Tag: uinavigationcontroller

从popup的视图控制器传递数据

我有两个视图控制器。 我第一次,当我按下button,第二个视图控制器被推到导航控制器的堆栈上。 在这里,在第二个视图控制器我有一个表格视图,当我点击一些行,他们被选中(如checkbox),并与该行相关的一些数据被添加到数组。 现在,当我完成select,我想回到第一个视图控制器,并使用该数组。 怎么做? 现在我的应用程序是这样工作的:我有一个委托协议,然后是我有属性数组的对象,我可以从整个应用程序访问该对象和它的数组… …但我不喜欢那样。 这是正确/最好/最简单的方法来做到这一点?

更改UINavigationController中“后退”button的默认字体

我正在尝试将UINavigationController中的“后退”button的默认字体更改为自定义字体 UIFont *myCustomFont = [UIFont fontWithName:@"MyCustomFont" size:18]; 我怎样才能设置这个自定义字体到后退button? 我已经浏览了其他类似问题的答案,但没有成功。

我怎样才能解除一个模式segue,然后执行push segue到新的视图控制器

我试图从navigation controller执行一个push segue ,解散之前在navigation controller上显示的modal 。 内部模态( UIViewController ): func textFieldShouldReturn(textField: UITextField) -> Bool { var searchNav = SearchNavigationController() self.dismissViewControllerAnimated(true, completion: {searchNav.goToNextView()}) return true } 在SearchNavigationController里面: func goToNextView() { performSegueWithIdentifier("searchNavigationToNextView", sender: self) } 问题是,当我打回来,我得到这个错误: 终止应用程序由于未捕获的exception“NSInvalidArgumentException”,原因:“Receiver()没有与标识符searchNavigationToNextView” segue出现在我的storyboard ,从UINavigationController转到next view 。 编辑:试过这个,在_SendSelectViewController中声明_sender var _sender = self并没有工作。 override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "searchNavigationToSingleSearch" […]

UINavigationControoller – setNavigationBarHidden:animated:如何同步其他animation

如何以编程方式隐藏导航栏时捕捉animation曲线和速度? 我想同步其他animation与这一个stream体过渡:)

显示提示时出现iOS5 UINavigationBar背景图片问题

我在iOS 5中使用新的外观代理来为我的UINavigationBar添加背景图片。 [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationBG.png"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationLandscapeBG.png"] forBarMetrics:UIBarMetricsLandscapePhone]; 这工作正常,但我需要设置导航栏的提示属性。 当我这样做,导航栏的高度增加,我的背景图像不再填充导航栏垂直,所以看起来非常糟糕。 如何在使用自定义背景图像时提示高度变化?

在父表视图的兄弟细节视图之间导航

我有一个表格视图,当我点击一个项目时,导航到一个细节视图。 我想要做的是从一个细节视图导航到兄弟细节视图(为表中的另一个项目),而不会返回到父表视图。 例如,如果桌子视图屏幕有许多属于这些types的盘子: 三明治 汤类 沙拉 当我select一个火腿三明治,我去这个菜的详细视图。 在这里,我看到那些喜欢火腿三明治的人也喜欢鸡肉面条汤和凯撒沙拉。 我想从火腿三明治去鸡肉面条汤或凯撒沙拉细节的意见,而没有animation返回到桌子的看法。 我怎样才能做到这一点?

从导航控制器中popup多个视图

我有一个应用程序,它的rootview是一个菜单,用户通过select一个加载另一个子视图的单元格来设置一个search查询的4个tableviews,所以基本的结构看起来像这样 Root View – Parent View (search view) –Sub View (user selects variables here to fill search parameters of the parent view 但其中一个父视图search参数要求另一个子视图被推到导航堆栈,所以它看起来像 Root View – Parent View (search view) –Sub View (user selects variables here to fill search parameters of the parent view —Sub View (related values to the previous subview ie Model / […]

从popup的UINavigationController或UITabBarController中确定viewWillAppear

我无法find一种方法来区分从Nav控制器堆栈popup,并从UITabBarController进入视图控制器。 我只想在ViewWillAppear中调用一个方法,只有在TabBar中显示视图,而不是在有人按下导航控制器的时候。 如果我没有使用TabBarController,我可以很容易地使用viewDidLoad获得这个function。 我试过了, override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) println("View Will Appear") if isBeingPresented() { println("BP") } if isMovingFromParentViewController() { println("from") } if isMovingToParentViewController() { println("to") } } 但是当我按下Tab键或者当按下button时,没有什么区别。 只有“看法会出现”才会被调用。 使用iOS 8.4 / Swift

iOS 7:标签栏控制器的不同导航项目

我是iOS应用程序开发的新手。 目前我正在开发一个带有标签栏的小应用程序。 我面临的问题是,我想有不同的导航项foreach选项卡。 我尝试了很多东西,但事情并不奏效。 我用本地的iOS语言进行编程。 在我的应用程序中,我有一个AppDelegate。 在我的AppDelegate中有一小段代码来设置我的mainViewController: – (void)setupOverlordViewController { MainViewController *rootVC = [[MainViewController alloc] initWithNibName:nil bundle:nil]; UINavigationController *navVC = [[UINavigationController alloc] initWithRootViewController:rootVC]; self.window.rootViewController = navVC; } 我在我的MainViewController中设置我的选项卡: – (void)viewDidLoad { UIViewController *tabView1 = [[Tab1ViewController alloc] init]; UIViewController *tabView2 = [[Tab2ViewController alloc] init]; UIViewController *tabView3 = [[Tab3ViewController alloc] init]; NSMutableArray *tabViewControllers = [[NSMutableArray alloc] init]; […]

如何正确设置UIViewController的navigationController标题?

我正在尝试下面的代码: – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Thing *sub = [[subscriptions objectAtIndex:indexPath.row] retain]; StoriesViewController *thing = [[StoriesViewController alloc] initWithThing:sub]; thing.navigationController.title = sub.title; [self.navigationController pushViewController:thing animated:YES]; [thing release]; [sub release]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; } 我以为这是你如何正确设置标题推控制器。 我尝试了thing.title,但是这是设置TabBarItem的标题,而不是。