iOS UINavigation
来源:互联网 发布:淘宝自由搭配套餐 功能 编辑:程序博客网 时间:2024/05/24 01:45
创建一个导航条,代码如下:
#import "AppDelegate.h"#import "ViewController.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. ViewController *aVC = [[ViewController alloc] init]; UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:aVC]; self.window.rootViewController = navigation; return YES;}
页面的跳转,代码如下:
#import "ViewController.h"#import "QViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.view.backgroundColor = [UIColor blueColor]; UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(10, 100,self.view.frame.size.width-20, 50)]; [btn setTitle:@"详情" forState:UIControlStateNormal]; [btn setBackgroundColor:[UIColor redColor]]; [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn];}-(void)btnClick:(id) sender { QViewController *aVC = [[QViewController alloc] init]; [self.navigationController pushViewController:aVC animated:YES];}
0 0
- iOS UINavigation
- IOS导航栏UINavigation
- ios UINavigation 用法示例
- iOS自定义UINavigation
- iOS-添加UINavigation
- UINavigation
- iOS 全局修改UINavigation 后退按钮
- ios--UITabBarController和UINavigation的集成
- iOS 全局修改UINavigation 后退按钮
- ios中UINavigation和UITabBar的结合
- iOS 全局修改UINavigation 后退按钮
- [IOS/UINavigation]隐藏UINavigationBar的返回文字
- ios中UINavigation和UITabBar的结合
- IOS Swift3.0自定义导航栏(UINavigation)
- iOS 视图切换(UITabBarController,UINavigation,Controller模态窗口)
- UITabBar和UINavigation组合使用与自定义样式(iOS)
- UITabBar和UINavigation组合使用与自定义样式(iOS)----- 转
- IOS在UINavigation的rightBarButton上添加多个按钮
- 浅谈java与.Net的相互调用
- linux fork.c
- 2013-专利电子收集
- NSMutableString的几个常用接口
- Java动态规划 实现最长公共子序列以及最长公共子字符串
- iOS UINavigation
- 对建立和删除索引的认识
- 基于MFC对话框编程:设置开机自启动
- Java动态规划 实现最长公共子序列以及最长公共子字符串
- 2014-08-22-小絮“中兴跑酷”
- 行为型模式之五——备忘录模式
- 谈谈:如何避免新入职的程序员痛苦和迷茫?
- 重新考虑容器的存储特性:线序,后进先出,先进先出,无序集合
- 程序员面试100题之七:最长公共子字符串