iT邦幫忙

2025 iThome 鐵人賽

DAY 27
0
Mobile Development

Xcode x Swift Vibe coding進階開發之旅系列 第 27

Xcode x Swift Vibe coding進階開發之旅 第二十七天 客製化tarbar(4) 定義切換畫面

  • 分享至 

  • xImage
  •  

說明

還是先將一些比較重要的定義寫完,可以確保AI不出錯。/images/emoticon/emoticon08.gif

程式

tarbarview

enum BottomItems: Int, CaseIterable {
    case oneViewController = 0, twoViewController, threeViewController
    
    var title: String{
        switch self {
        case .oneViewController:
            return NSLocalizedString("oneViewController", comment: "")
        case .twoViewController:
            return NSLocalizedString("twoViewController", comment: "")
        case .threeViewController:
            return NSLocalizedString("threeViewController", comment: "")
        }
    }
    
}

/images/emoticon/emoticon07.gif
/images/emoticon/emoticon06.gif


上一篇
Xcode x Swift Vibe coding進階開發之旅 第二十六天 客製化tarbar(3)建立主畫面
下一篇
Xcode x Swift Vibe coding進階開發之旅 第二十八天 客製化tarbar(5) 不如意的AI
系列文
Xcode x Swift Vibe coding進階開發之旅29
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言