【发布时间】:2014-07-28 18:21:09
【问题描述】:
我正在申请一份。
App的主视图是singleViewController。
在我点击 singleViewController 中的标签后,显示转到 UINavigationController 实例屏幕(参考:捕获的图像)。
下面的代码是方法,当我点击标签时。
那么,我想问的是关于
1. 在 UINavigationController 中添加 UITableView 应该怎么做?
2. 我应该准备 UINavigationController 类文件(.h 和 .m)
◆下面是我的过渡图
[singleViewController(不带 UINavigationController)] ←→[UINavigationController(带 UITableView)]
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
if ( touch.view.tag == mainCountryLabel.tag ){
NSLog(@"%d", mainCountryLabel.tag);
NSLog(@"Label Clicked !!");
UINavigationController *testView = [[UINavigationController alloc] init];
testView.view.backgroundColor = [UIColor redColor];
[self presentViewController:testView animated:NO completion:nil];
}
最好的问候
【问题讨论】:
-
你在使用故事板吗?
-
>>YuviGr 我不会用storyboard,因为我想深入了解Objective-c。我觉得storyboard很有用,但对程序员来说没什么价值。
标签: ios iphone objective-c uitableview uinavigationcontroller