Wednesday 18 July 2012

Bar Button Item in iOS

.h File

-(void)addtofavorites;


.m File

-(void)ViewDidLoad
{
UIBarButtonItem *add=[[UIBarButtonItem alloc]initWithTitle:@"Add To Favorites" style:UIBarButtonSystemItemFlexibleSpace target:self action:@selector(addtofavorites)];                          self.navigationItem.rightBarButtonItem=add;
}


-(void)addtofavorites
{
          //NavigationCodings
}


No comments: