如何在IOS 4.0中自定义self.title的垂直位置?

时间:2012-08-27 04:54:35

标签: iphone xcode

如何在iOS 4.0中设置/自定义setTitleVerticalPositionAdjustment?我需要建议。

- (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;

}

0 个答案:

没有答案