[問題] tableview editmode 時的 highlight
各位大大午安
我發現tableview 的 cell 如果是 custom 時
在 editmode 時選擇到會背景 highlight
請問有什麼辦法可以把那個 hightlight 給 disable 掉
爬了很久的 google 都沒有看到解決的方法@@
先謝謝各位觀看的大大
--
公告
D.
#1ByBycco (DSLR) [ptt.cc] [作品] 台灣山
→ sorkayi :白目 05/17 14:52
D.罵人白目違反 3-4 人身攻擊相關規定,sorkayi 警告一次。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.128.88.208
※ 編輯: sorkayi 來自: 140.128.88.208 (12/18 13:05)
推
12/18 13:50, , 1F
12/18 13:50, 1F
我有使用過這個方法
不過我在 edit mode 我的 edit 就會失效了@@?
因為我想要有前面那個打選擇到的打溝功能
※ 編輯: sorkayi 來自: 140.128.88.208 (12/18 14:49)
→
12/18 15:07, , 2F
12/18 15:07, 2F
→
12/18 15:07, , 3F
12/18 15:07, 3F
目前是使用到 UITableViewCellAccessoryCheckmark 這個 style 去做多選擇
但是在 edit mode 時
UITableViewCellAccessoryCheckmark 前面的打勾 背景會被變成淡藍色
還有我的 custom cell 也有用到 UIView 背景也會被變成淡藍色
不知道有沒有什麼方法可以解決@@?
※ 編輯: sorkayi 來自: 122.117.2.251 (12/19 01:35)
後來我在 custom cell 中全部都覆寫掉所有的
setHightlight 的兩個函式
並且在加入
[cell setSelectedBackgroundView: bgView];
就行了
bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 58, 44)];
bgView.backgroundColor = [UIColor colorWithPatternImage:
[UIImage imageNamed:@"favorite_part.png"]];
原來是我笨 >///<
※ 編輯: sorkayi 來自: 140.128.88.208 (12/24 17:57)
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章