标签:select 交互 tabbar lazy name 选中 nbsp var gen
private lazy var imageNames = ["tabbar_home", "tabbar_message_center", "", "tabbar_discover", "tabbar_profile"] // 遍历所有的item for i in 0..<tabBar.items!.count { // 2. 获取item let item = tabBar.items![i] // 3. 如果下标为2,则该item不可以和用户交互 if i == 2 { item.isEnabled = false continue } // 4. 设置其他item选中时候的图片 item.selectedImage = UIImage(named: imageNames[i] + "_highlighted") print("\(item.selectedImage)") }
标签:select 交互 tabbar lazy name 选中 nbsp var gen
原文地址:http://www.cnblogs.com/iOS363536404/p/5983621.html