草庐IT

UINavigationController-Alike

全部标签

ios - 关闭一个 UINavigationController 并呈现另一个 UINavigationController

我有两个ViewController,ViewControllerA和ViewControllerB,嵌入在UINavigationController中。ViewControllerA有一个显示图像的UICollectionView。当位于索引0的相机图标和UICollectionViewCell被选中时,它应该关闭ViewControllerA并显示ViewControllerB。而且,还有一个ViewController以模态方式呈现ViewControllerA这就是我所做的,但它只是解除了ViewControllerA并且没有任何反应letcontroller=self.st

ios - 移动到下一个 UIViewController 时保留 UINavigationController 但隐藏 UITabBarController

我有一个嵌入在UINavigationController和UITabBarController中的UITableViewController。当我选择一行时,我想在UINavigationController而不是在UITabBarController中打开我的UIViewController。当我在InterfaceBuilder中创建从单元格到我的UIViewController的segue时,我选择Show(例如,Push)。问题是它还保留了UITabBarController。然后我尝试了其他类型的segue,但没有一个显示UINavigationController。我考虑

ios - UINavigationController - 获取交互式弹出手势识别器进度

我有TabBarController,它有自定义中心按钮(UIButton)。这里的目标是在用户从其他ViewController返回到TabBarController时为其不透明度设置动画。所以我想要实现的是开始将中心按钮的不透明度设置为从0到1的动画,具体取决于用户滑动的“距离”。我正在使用interactivePopGestureRecognizer,因此检测边缘“进度”的滑动对于我的情况来说是理想的。或者还有其他方法吗?也许检测topViewController可见性? 最佳答案 我刚刚通过添加自定义目标解决了这个问题sel

ios - 在 Controller 转换期间动画化 UINavigationController 高度

我正在快速设计一个iOS应用程序,我在Controller转换期间遇到动画方面的一些困难。具体来说,我实现了一个UINavigationControllerDelegate,用于监听某个View何时被推送。推送此View时,我想在屏幕底部隐藏一个栏。我的代码几乎完美地工作,但是每当我在导航Controller的高度上开始动画时,当前View(正在删除)正确地设置其高度的动画,但是被推送的新Controller已经具有新的高度动画。为了向其中添加一些代码,从我的UINavigationControllerDelegate的willShowviewController函数中调用了以下函数:

ios - 如何使用自定义 header 或 UINavigationBar 子类化 UINavigationController?

我想将UINavigationController子类化以包含几种类型的header,这些header可以从一种转换到另一种。我正在考虑设计中的一些事情:我应该如何管理子ControllerView的大小?将它们限制在每种header的底部似乎很笨拙,并且在转换期间难以管理。我尝试在loadView()中将UIView子类分配给UINavigationController的View,但这样做会导致子ControllerView不显示(而是显示为黑色)。为什么会发生这种意外行为?如何支持UINavigationController的“从左向右拖动”过渡?有没有办法通过子类化UINavig

ios - 在自定义 UINavigationController 类中创建 UINavigationBar 时出错

我有一个自定义的UINavigationController,我可以从Storyboard访问它,我想通过创建自定义导航栏来自定义导航栏的高度。这是我目前所拥有的:varnavBar=UINavigationBar(frame:CGRect(x:0.0,y:0.0,width:UIScreen.main().bounds.width,height:70.0))navBar.barTintColor=UIColor(red:155.0/255.0,green:155.0/255.0,blue:155.0/255.0,alpha:1.0)super.init(navigationBarCl

ios - UINavigationController:在每次转换后显示具有不同方向的嵌入式 View Controller ?

这是StackOverflow上的一个常见问题,但其他解决方案均无效。许多也是几年前写的。以下是一些被考虑的帖子:IsitpossibletohavedifferentorientationsforviewControllersinsideUINavigationController?SupportlandscapeforonlyoneviewinUINavigationControllerIsitpossibletohavedifferentorientationsforviewControllersinsideUINavigationController?Whycan'tIforc

ios - Firebase Analytics 持续跟踪 UINavigationController

我正在从GoogleAnalytics过渡到FirebaseAnalytics。与GoogleAnalytics不同,Firebase会自动跟踪屏幕浏览量,这太棒了!但是,它不是跟踪屏幕,而是不断尝试跟踪UINavigationController。每次导航到不同的ViewController时,我都会收到两次以下错误日志。[Firebase/Analytics][I-ACS031006]Viewcontrolleralreadytracked.Class,ID:UINavigationController,-1770652405567491888当你有一个导航Controller时,

ios - 在 UITabBarController 中使用 UINavigationController 时,UISearchBar 被截断

我正在尝试在我的UITabBarController中的一个选项卡中实现一个搜索栏,该选项卡是UINavigationController中的一个UITableViewController...我正在关注Apple教程-我尝试了很多不同的选项,包括此处提到的答案SearchbargetscutoffwhenusingUISearchControllerwithaUITabBarControllerinsideaUINavigationController我尝试使用以下属性设置self.definesPresentationContext=true或self.tabBarControll

ios - 如何以编程方式重新排序我的 UINavigationController 项目?

在我的TabBarViewController中,我正在创建一个导航并以模态方式呈现它。funcviewDidLoad(){super.viewDidLoad();//CreateapresentthisviewcontrollerinviewDidLoadself.navController=UINavigationController()self.presentViewController(self.navController,animated:true,completion:nil)}//ThismethodgetscalledwhenTabBarVCgetsaNSNotific