草庐IT

UINavigationcontroller

全部标签

ios - 如何在没有 UINavigationController 的情况下以编程方式返回到上一个 View ?

如何在没有UINavigationController的情况下以编程方式返回到上一个View,因为我找到的所有示例都使用UINavigationController?我正在制作View以发送反馈,我想在更多应用中使用此View。如果我使用UINavigationController而不是应用程序需要有UINavigationController才能使用我的View发送反馈。这可能吗?怎么做?这是我如何显示发送反馈意见的代码:-(IBAction)showFeedbackView:(id)sender{WOC_FeedbackViewController*feedbackView=[[W

iphone - 如何使 UINavigationController 的 Navigation Bar 显示在底部?

有没有办法让UINavigationController的默认导航栏显示在底部而不是顶部?我知道有一个UIToolbar可以显示在底部,但那个是特定于每个View的,并且不带有“后退”按钮。 最佳答案 如果您使用NIB创建View,那么它相当简单-在属性->底部栏中选择导航栏。如果不是,那么您应该直接访问导航栏并更改其坐标。在你的ViewController中:CGRectoldRect=self.navigationController.navigationBar.frame;self.navigationController.n

ios - 如何更改 UINavigationController 背景颜色?

我可以通过覆盖drawRect:方法来更改UINavigationController的背景图像:@implementationUINavigationBar(UINavigationBarCategory)-(void)drawRect:(CGRect)rect{UIImage*img=[UIImageimageNamed:@"navController.png"];[imgdrawInRect:CGRectMake(0,0,self.frame.size.width,self.frame.size.height)];self.tintColor=[UIColorblueColor]

ios - 为 UINavigationController 制作自定义后退按钮

我正在为iOS4.2+开发一个应用程序。我将我的UINavigationController子类化以插入两个UIImageView并使导航栏看起来很自定义。一切都很好,但我有一个小问题。我创建了自定义UIBarButtonItem并在我的ViewController中放置了它们:self.navigationItem.leftBarButtonItem=[[UIBarButtonItemalloc]initWithCustomView:backButton];它也可以工作,但问题是要使它工作,我需要从以下位置调用它:-(void)viewDidAppear:(BOOL)animated

iphone - UINavigationController - setNavigationBarHidden :animated: How to sync other animations

编程隐藏导航栏时如何捕捉动画曲线和速度?我想将其他动画与此动画同步以实现流畅的过渡:) 最佳答案 如果您查看UINavigationController文档,则有这一行:Foranimatedtransitions,thedurationoftheanimationisspecifiedbythevalueintheUINavigationControllerHideShowBarDurationconstant. 关于iphone-UINavigationController-setN

ios - UINavigationController 中的常量 UIBarButtonItem

有什么方法可以让我拥有一个UINavigationController并让它始终显示相同的UIBarButtonItem,无论它被按下多少次? 最佳答案 试试这个-创建UINavigationController的子类(CustomNavigationController)并使用它来推送您的ViewController。在CustomNavigationController中,在init或viewDidLoad中创建UIBarButtonItem。添加target&action到它。在CustomNavigationControll

iOS 7 UINavigationController 不平衡调用开始/结束外观转换

我正在使用以下代码在ViewDeck中切换View,在iOS5和6中完全没问题,但在iOS7中,当我尝试弹出到现有View时。屏幕变成全白/黑。-(void)switchViewWithViewController:(UIViewController*)viewControllerToSwitch{if(viewControllerToSwitch){//ResetMenuButton[self.viewDeckControllercloseLeftViewAnimated:YEScompletion:^(IIViewDeckController*controller){[((Base

ios - UINavigationController 和 UIViewController 的导航 Controller 属性

我最近遇到了这个,我想知道为什么要这样设计。如果您有一个UINavigationController,它有一个带有容器View的child,其中有一个嵌入式ViewController,为什么这个child的self.navigationController属性没有设置什么?来自关于这个主题的AppleDoc:Thenearestancestorintheviewcontrollerhierarchythatisanavigationcontroller.(read-only)@property(nonatomic,readonly,retain)UINavigationControl

ios - 在 UINavigationController 中支持纵向和横向 View 的最佳实践

我四处搜索,但我不确定我得出的结果是处理此问题的最佳方法(尽管它似乎是唯一的方法)。根据Wanttousemuliplenibsfordifferentiphoneinterfaceorientations我实现了相关方法,一切似乎都很好。不幸的是,我必须处理UINavigationController,并且每个页面都必须支持纵向和横向模式,并在两种模式下重现相同的功能。这意味着如果用户在某个时候决定从纵向切换到横向,整个应用程序应该允许他以他选择的模式在页面中来回导航。显然缺少的文档是如何处理这个问题。在我看来,我有许多带有执行导航的附加showChild方法的按钮。在纵向模式下一切

ios - 无法在 UIPopover 的 UINavigationController 侧调整 UIViewController 的高度 contentSizeForViewInPopover

我在UIPopoverController中使用UINavigationController-(void)showEditMenuFrom:(UIButton*)button{if(self.popover){[self.popoverdismissPopoverAnimated:YES];self.popover=nil;}else{EditMenuViewController*editMenuViewController=[[EditMenuViewControlleralloc]initWithNibName:@"EditMenuViewController"bundle:nil