第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在iOS 7中更改導航欄顏色?

如何在iOS 7中更改導航欄顏色?

莫回無 2019-07-31 15:18:43
如何在iOS 7中更改導航欄顏色?如何在iOS 7中更改導航欄顏色?基本上我想要實現(xiàn)像Twitter Nav Bar這樣的東西(更新的Twitter iOS7就是這樣)。我嵌入了一個導航欄view controller。我想要的是將導航欄顏色更改為淺藍色以及頂部的實用工具欄。我似乎找不到我的選擇storyboard。
查看完整描述

3 回答

?
holdtom

TA貢獻1805條經(jīng)驗 獲得超10個贊

tintColor在iOS 7.0中,for欄的行為已發(fā)生變化。它不再影響酒吧的背景。


從文檔:


barTintColor 類參考


應用于導航欄背景的色調(diào)顏色。


@property(nonatomic, retain) UIColor *barTintColor

討論

默認情況下,此顏色為半透明,除非您將半透明屬性設置為NO。


可用性


適用于iOS 7.0及更高版本。


在UINavigationBar.h中聲明


NSArray *ver = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];

if ([[ver objectAtIndex:0] intValue] >= 7) {

    // iOS 7.0 or later   

    self.navigationController.navigationBar.barTintColor = [UIColor redColor];

    self.navigationController.navigationBar.translucent = NO;

}else {

    // iOS 6.1 or earlier

    self.navigationController.navigationBar.tintColor = [UIColor redColor];

}

在iOS 7 UI Transition Guide中,我們也可以使用它來檢查iOS版本


if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {

        // iOS 6.1 or earlier

        self.navigationController.navigationBar.tintColor = [UIColor redColor];

    } else {

        // iOS 7.0 or later     

        self.navigationController.navigationBar.barTintColor = [UIColor redColor];

        self.navigationController.navigationBar.translucent = NO;

    }

編輯 使用xib


查看完整回答
反對 回復 2019-07-31
?
30秒到達戰(zhàn)場

TA貢獻1828條經(jīng)驗 獲得超6個贊

通過在Xcode中使用Interface Builder,可以很容易地完成原始問題 - 獲取舊Twitter的Nav Bar外觀,藍色背景和白色文本。

  • 使用文檔大綱,選擇導航欄。

  • 在“屬性”檢查器的“導航欄”組中,將“樣式”從“默認”更改為“黑色”。這會將導航和狀態(tài)欄的背景顏色更改為黑色,將其文本更改為白色。因此,當應用程序運行時,狀態(tài)欄中的電池和其他圖標和文本將顯示為白色。

  • 在同一導航欄組中,將條形色調(diào)更改為您喜歡的顏色。

  • 如果導航欄中有條形按鈕項目,它們?nèi)詫⒁阅J的藍色顯示其文本,因此在“屬性”檢查器的“視圖”組中,將“色調(diào)”更改為“白色”。

這應該會得到你想要的。這是一個屏幕截圖,可以更容易地看到進行更改的位置。

請注意,僅更改條形色調(diào)不會更改導航欄或狀態(tài)欄中的文本顏色。風格也需要改變


查看完整回答
反對 回復 2019-07-31
?
肥皂起泡泡

TA貢獻1829條經(jīng)驗 獲得超6個贊


self.navigationBar.barTintColor = [UIColor blueColor];

self.navigationBar.tintColor = [UIColor whiteColor];

self.navigationBar.translucent = NO;


// *barTintColor* sets the background color

// *tintColor* sets the buttons color


查看完整回答
反對 回復 2019-07-31
  • 3 回答
  • 0 關注
  • 745 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號