UILabel
UITableView
背景色
1 | tableView.backgroundColor = UIColor(hexString: "#f3f3f3", alpha: 0.6); |
分割线
1 | tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine; |
內边距
1 | self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 64, 0); |
UITableViewCell
右侧标记
1 | cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator; |
取消选中样式
1 | cell.selectionStyle = UITableViewCellSelectionStyle.None; |
UIButton
标题
1 | statusButton.setTitle("已完成", forState: UIControlState.Normal); |
UINavigationBar(全局设置)
Swift示例
1 | let appear = UINavigationBar.appearance(); |
OC示例
1 | UINavigationBar *appear = [UINavigationBar appearance]; |
UITabBar(全局设置)
OC示例
1 | UITabBar *tabbarAppear = [UITabBar appearance]; |
UINavigationBar(页面设置)
设置标题颜色(OC)
1 | //选择自己喜欢的颜色 |
设置透明(Swift)
后两句是核心
1 | //设置Navigationbar |
UISearchBar(全局设置)
Swift示例
1 | let searchBarAppear = UISearchBar.appearance(); |