views:

22

answers:

0

Hi Guys,

i am setting the Left bar button to the navigation bar. So I need same font as default bar buttons have.

backButton = [[UIButton alloc] initWithFrame:CGRectMake(5, 5, 100, 30)];
[backButton setBackgroundImage:[UIImage imageNamed:@"backbutton_100.png"] forState:UIControlStateNormal];
[backButton addTarget:self  action:@selector(backAction:)  forControlEvents:UIControlEventTouchUpInside];
[backButton setTitle:@"  All Customers" forState:UIControlStateNormal];
backButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];// I am not getting same font style........................
[buttonView addSubview:backButton];

UIBarButtonItem* leftButton = [[UIBarButtonItem alloc] initWithCustomView:buttonView];
self.navigationItem.leftBarButtonItem = leftButton;
[leftButton release];