1

How can I set/customize setTitleVerticalPositionAdjustment in iOS 4.0? I need suggestion.

- (void)viewDidLoad
{
    label = [[UILabel alloc] init];
    label.backgroundColor = [UIColor clearColor];
    label.textAlignment = UITextAlignmentRight;
    label.textColor=[UIColor whiteColor]; 
    label.font = [ UIFont fontWithName: @"XXII DIRTY-ARMY" size: 32.0 ];
    label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.0f];

    label.text=NSLocalizedString(@"HomeTitle", @"Home");
    self.navigationController.navigationBar.tintColor = [UIColor   newBrownLight];
    label.frame=CGRectMake(0, 0, 290, 44);

    self.navigationItem.titleView = label; 
    self.navigationItem.title=label.text;

}

Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99

0 Answers0