I am newbie trying to make an app similar to Notes app of iPhone using UITextView
.
I am getting the textView
and lines and it is working fine.
use this code....
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Back", @"")
style:UIBarButtonItemStyleDone
target:self
action:@selector(YourActionMethod:)];
self.navigationItem.leftBarButtonItem = addButton;
Navigation Bar Image
UINavigationBar *navBar = [[self navigationController] navigationBar];
UIImage *image = [UIImage imageNamed:@"TopBar.png"];
[navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
Back Button
-(void)getBackBtn
{
UIButton *Btn =[UIButton buttonWithType:UIButtonTypeCustom];
[Btn setFrame:CGRectMake(0.0f,0.0f,50.0f,30.0f)];
[Btn setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"back.png"]] forState:UIControlStateNormal];
//[Btn setTitle:@"OK" forState:UIControlStateNormal];
//Btn.titleLabel.font = [UIFont fontWithName:@"Georgia" size:14];
[Btn addTarget:self action:@selector(backBtnPress:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithCustomView:Btn];
[self.navigationItem setLeftBarButtonItem:addButton];
}
BackButtonAction
-(IBAction)backBtnPress:(id)sender
{
}
View on NavigationBar
For View on navigationBar you can follow my answer Link