2014-10-03 2 views

ответ

0

Вы можете попробовать это enter image description here

[self.navigationItem setTitle:@"Vijay"]; 

    UIImage *image = [UIImage imageNamed:@"tabarrrr"]; 
    [self.navigationController.navigationBar setBackgroundImage:image forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; 
    [self.navigationController.navigationBar setShadowImage:image]; 
    [self.navigationController.navigationBar setShadowImage:[UIImage new]]; 
    [self.navigationController setNavigationBarHidden:FALSE]; 
    [self.navigationController.navigationBar setTintColor:[UIColor whiteColor]]; 


//  
// UIBarButtonItem *RigthButtonClicek=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"search.png"] style:UIBarButtonItemStylePlain target:self action:@selector(RigthButtonClicek:)]; 

    UIButton *button1=[UIButton buttonWithType:UIButtonTypeCustom]; 
    [button1 setFrame:CGRectMake(10.0, 2.0, 40, 20.0)]; 
    [button1 addTarget:self action:@selector(RigthButtonClicek:) forControlEvents:UIControlEventTouchUpInside]; 
    [button1 setImage:[UIImage imageNamed:@"cancelbtn.png"] forState:UIControlStateNormal]; 
    UIBarButtonItem *button = [[UIBarButtonItem alloc]initWithCustomView:button1]; 
    self.navigationItem.leftBarButtonItem = button; 


    UIButton *button2=[UIButton buttonWithType:UIButtonTypeCustom]; 
    [button2 setFrame:CGRectMake(10.0, 2.0, 40, 20.0)]; 
    [button2 addTarget:self action:@selector(RigthButtonClicek:) forControlEvents:UIControlEventTouchUpInside]; 
    [button2 setImage:[UIImage imageNamed:@"search.png"] forState:UIControlStateNormal]; 
    UIBarButtonItem *button3 = [[UIBarButtonItem alloc]initWithCustomView:button2]; 
    self.navigationItem.rightBarButtonItem = button3; 

enter image description here

Смежные вопросы