我將圖片添加到導航欄它工作正常,但當我想添加標題設置標題爲iphone
[email protected]"Activity";
它採用另一種方式我添加標題標籤不顯示任何
UINavigation酒吧也不過這個工作得很好一個視圖控制器,但是,第二控制器我改變標題,但它也表明prevoius標題
這裏是我的代碼
UIImage *image = [UIImage imageNamed:@"Nav.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.navigationController.navigationBar addSubview:imageView];
titleLabel=[[UILabel alloc] initWithFrame:CGRectMake(50,2,250,36)];
[email protected]"Activity";
titleLabel.textColor=[UIColor whiteColor];
titleLabel.backgroundColor=[UIColor clearColor];
titleLabel.font=[UIFont fontWithName:@"Helvetica-Bold" size :18];
//titleLabel boldSystemFontOfSize:14.0;
[self.navigationController.navigationBar addSubview:titleLabel];
它給錯誤UIBarMetricsDefault –
你得到哪些錯誤? –
@JawAli現在使用我更新的代碼... –