日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

UITableView-常见设置

發布時間:2025/5/22 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 UITableView-常见设置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

UITableView的常見設置

// 分割線顏色 self.tableView.separatorColor = [UIColor redColor];// 隱藏分割線 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;// tableView有數據的時候才需要分割線 // 開發小技巧:快速取消分割線self.tableView.tableFooterView = [[UIView alloc] init];

?

UITableViewCell的常見設置

// 取消選中的樣式(常用) 讓當前 cell 按下無反應 cell.selectionStyle = UITableViewCellSelectionStyleNone;// 設置選中的背景色 UIView *selectedBackgroundView = [[UIView alloc] init]; selectedBackgroundView.backgroundColor = [UIColor redColor]; cell.selectedBackgroundView = selectedBackgroundView;// 設置默認的背景色 cell.backgroundColor = [UIColor blueColor];// 設置默認的背景色 UIView *backgroundView = [[UIView alloc] init]; backgroundView.backgroundColor = [UIColor greenColor]; cell.backgroundView = backgroundView;// backgroundView的優先級 > backgroundColor // 設置指示器 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.accessoryView = [[UISwitch alloc] init];

?

轉載于:https://www.cnblogs.com/luoze/p/5467595.html

總結

以上是生活随笔為你收集整理的UITableView-常见设置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。