标签: uinavigationcontroller

UITableViewController在推送时没有导航栏

我正在使用此代码

-(void)gotoInformationViewController:(id)sender
{
    MoreViewController *moreViewController = [[MoreViewController alloc] init];
    [self.navigationController pushViewController:moreViewController animated:YES];
    [moreViewController release];
}
Run Code Online (Sandbox Code Playgroud)

推动一个MoreViewController(这是UITableViewController),但它UINavigationBar在推动时没有,只是UITableView在整个屏幕上.

iphone uitableview uinavigationcontroller ipad ios

0
推荐指数
1
解决办法
1700
查看次数

关闭多个ModalViewControllers iOS

好的,我知道有很多关于这个主题的信息,但是我尝试的一切都不起作用.我的设置是这样的.

应用程序使用navigationController加载View A,这是一个Tableview.延迟后,我提出了一个ModalView B.在视图B上我有一个按钮,在视图B上方显示另一个模态视图C.在模态视图中CI有一个按钮来消除C.现在当我按下这个按钮时我也想要消解模态查看B将我带回我的RootView,这是提到的tableView视图A.

从模态视图CI有一个按钮,但只能使用下面的动作来解除C这需要我进入模态视图B:我想要做的是用这个按钮删除C和B,如果可能的话,将我返回给A?

-(IBAction)dismissWebView:(id)sender{

[self dismissModalViewControllerAnimated:YES];

}
Run Code Online (Sandbox Code Playgroud)

我已经从上面的行动中尝试了所有这些

[self.parentViewController dismissModalViewControllerAnimated:YES];
[self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
[adsRootView dismissModalViewControllerAnimated:YES];
[self dismissModalViewControllerAnimated:YES];
[self dismissModalViewControllerAnimated:YES];
[self.navigationController dismissModalViewControllerAnimated:YES];
[self.adsRootView dismissModalViewControllerAnimated:YES];
[[[self parentViewController] parentViewController] dismissModalViewControllerAnimated:YES];
[self.navigationController popToRootViewControllerAnimated:NO];
Run Code Online (Sandbox Code Playgroud)

除了仅解除Modal视图C之外,其中任何一个都没有做任何事情.

uiviewcontroller uinavigationcontroller modalviewcontroller presentmodalviewcontroller ios

0
推荐指数
1
解决办法
1387
查看次数

iOS navigationController pushViewController无法正常工作

我有一个故事板UINavigationController.导航控制器的根视图控制器称为rootViewController.

我试图以编程方式将视图控制器(取决于其他条件)更改为另一个名为的控制器loginViewController.

我试图viewDidLoad在rootViewController中这样做:

- (void)viewDidLoad
{

    [super viewDidLoad];

    loginViewController *viewController = [[loginViewController alloc] init];

    [self.navigationController pushViewController:viewController animated:YES];

}
Run Code Online (Sandbox Code Playgroud)

我没有得到任何错误,但它没有工作.

它只是使用顶部导航后退按钮加载导航控制器,但屏幕的其余部分为黑色.这就像它没有加载任何视图控制器.

我想弄清楚我做错了什么.

对此的任何帮助都会很棒.

谢谢

cocoa-touch objective-c storyboard uinavigationcontroller ios

0
推荐指数
1
解决办法
3563
查看次数

navigationController:pushViewController,具有iPhone事务的特殊效果

通常我们总是使用以下方法从一个视图推送到另一个视图:

[self.navigationController pushViewController:nextView animated:YES];

for some other animations we used :UIViewAnimationTransitionCurlDown / flipRight etc etc..

所有这些都经常使用,

我希望我的应用程序具有不同的转换 ..

过渡中的任何其他自定义过渡/特殊效果..(推/弹出)或动画的任何其他外部api ..

iphone objective-c uinavigationcontroller pushviewcontroller

0
推荐指数
1
解决办法
1188
查看次数

如何从app delegate访问uitabbarcontroller内的uinavigationcontroller中的uitableview?

我试图在一个uitableview中访问一个刷新控制方法,该方法位于导航控制器内部,这是一个tabbarcontroller,这是我的根,但我很难得到一个精确的句柄.

这是我到目前为止在AppDelegate中的代码,但它不起作用...

UITableViewController *tableView = (UITableViewController *)[[self.tabbarController viewControllers][0] tableView];
    [tableView.refreshControl beginRefreshing];
Run Code Online (Sandbox Code Playgroud)

我有5个标签栏项目,我相信我可以通过[0],[1],[2],[3]和我在UITableView中的代码访问(尽管可能无关紧要)...

// Add Refresh Control
    UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
    [refreshControl addTarget:appDelegate action:@selector(forceDownload) forControlEvents:UIControlEventValueChanged];
    self.refreshControl = refreshControl;
    [refreshControl release];
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激,因为我无法找到任何在线访问这么深的.

objective-c uitabbarcontroller uitableview uinavigationcontroller appdelegate

0
推荐指数
1
解决办法
858
查看次数

具有奇怪外观的setBackButtonBackgroundImage

在AppDelegate.m中使用它来为我的自定义NavBar:

UIImage *NavigationPortraitBackground = [[UIImage imageNamed:@"gradient_main"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UINavigationBar appearance] setBackgroundImage:NavigationPortraitBackground forBarMetrics:UIBarMetricsDefault];
UIImage *barBackBtnImg = [[UIImage imageNamed:@"btn_nav_default.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:barBackBtnImg forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
Run Code Online (Sandbox Code Playgroud)

结果是:

在此输入图像描述

如你所见,按钮似乎重复了.按钮尺寸为61x30.文本没有居中.如果文本较短(例如菜单),则按钮图像被剪切,如果文本较长,则按钮重复.具有较小图标(30x30)的按钮也存在类似问题.按钮显示正常,但我可以点击图像外的按钮:(

xcode objective-c uinavigationcontroller uibarbuttonitem ios

0
推荐指数
1
解决办法
2315
查看次数

动画时pushViewController不工作:NO

我不确定我的应用程序究竟出现了什么,但是当我现在尝试更改为视图控制器时,它在动画时不起作用:NO.动画时:是,它可以工作但显示错误:

Unbalanced calls to begin/end appearance transitions
Run Code Online (Sandbox Code Playgroud)

这是我调用它的(相当简单的)代码:

JViewerViewController *viewer = [[JViewerViewController alloc] init]; 
[self.navigationController pushViewController:viewer animated:NO];
Run Code Online (Sandbox Code Playgroud)

我在导航控制器上做了一个NSLog,查看器是一个可见的视图控制器.有趣的是,它将查看器视为可视视图控制器.

iphone xcode objective-c uinavigationcontroller ios

0
推荐指数
1
解决办法
1397
查看次数

关闭tableView上的UITableViewController:didSelectRowAtIndexPath:indexPath

目前我有一个UIView,其中UItableview单元格添加到子视图中,就像这样,在此输入图像描述

当按下按钮时,它会推送到另一个导航控制器,其子类是一个uitableviewcontroller ....

在此输入图像描述

因此,当用户点击其中一个tableviewcells时...我希望从导航堆栈中取出视图控制器并返回到先前列出的上一个视图.

我使用以下实现实现了下面列出的UITableviewcontroller方法....但没有发生任何事情:P ....

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

objective-c uitableview uinavigationcontroller

0
推荐指数
1
解决办法
1783
查看次数

如何使导航栏均匀半透明?

我正在iOS 7上编写一个应用程序,我似乎无法处理navigationBar和工具栏的透明度,如何将导航栏设置为50%不透明度的黑色?

我已经阅读了向ios7指南的过渡,我看过wwdc13讲座214,但我的状态栏仍然具有与附加导航栏的其余部分不同的透明度.

这是我的代码:

// APP-WIDE THEMING
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];
[[UINavigationBar appearance] setBackgroundColor:[UIColor blueColor]];  
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Run Code Online (Sandbox Code Playgroud)

这是我的问题的截图:http://grab.by/qiyU

cocoa objective-c uinavigationbar uinavigationcontroller ios7

0
推荐指数
1
解决办法
4714
查看次数

uibarbuttonitem色调不是白色,当我设置它

我在我的app delegate(iOS7)中有这个:

self.window.tintColor = [UIColor whiteColor];

但不知何故,uibarnavigationitem(系统默认添加图标)的颜色将自己设置为黑色,所有其他项目都是白色.虽然当我重置iPhone模拟器时,这个添加图标是白色的,但在重新运行应用程序时,它会变黑.

此人的色调颜色在属性检查器中设置为默认值.在代码中我没有选择让它变黑.

我在app委托中做错了什么?

uinavigationcontroller uibarbuttonitem ios ios7

0
推荐指数
1
解决办法
2649
查看次数