隐藏系统的navgation
-(void)viewWillAppear:(BOOL)animated
{
self.navigationController.navigationBar.hidden=YES;
}
- (void)viewDidLoad {
[super viewDidLoad];
UIView*nav_view=[[UIView alloc]initWithFrame:CGRectMake(0, 20, self.view.bounds.size.width, 44)];
nav_view.backgroundColor=[UIColor blackColor];
UIButton*dl_button=[[UIButton alloc]initWithFrame:CGRectMake(20, 7, 40, 30)];
[dl_button setTitle:@"登陆" forState:UIControlStateNormal];
dl_button.titleLabel.font=[UIFont boldSystemFontOfSize:20];
[dl_button addTarget:self action:@selector(dl) forControlEvents:UIControlEventTouchUpInside];
[nav_view addSubview:dl_button];
UILabel*nav_label=[[UILabel alloc]initWithFrame:CGRectMake(self.view.bounds.size.width/2-50, 7, 100, 30)];
nav_label.text=@"竟然没标题";
nav_label.textAlignment=NSTextAlignmentCenter;
nav_label.textColor=[UIColor whiteColor];
[nav_view addSubview:nav_label];
UIButton*ss_button=[[UIButton alloc]initWithFrame:CGRectMake(self.view.bounds.size.width-100, 7, 40, 32)];
[ss_button setImage:[UIImage imageNamed:@"spotlight-blue-button"] forState:UIControlStateNormal];
[nav_view addSubview:ss_button];
UIButton*tj_button=[[UIButton alloc]initWithFrame:CGRectMake(self.view.bounds.size.width-50, 7, 40, 32)];
[tj_button setImage:[UIImage imageNamed:@"plus_2"] forState:UIControlStateNormal];
[nav_view addSubview:tj_button];
[self.view addSubview:nav_view];
}