Home
Sign Up
Sign In
iOS 开发实用技术导航
NSHipster 中文版
›
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
›
http://www.cocos2d-iphone.org/
CocoaPods
›
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
›
http://code.google.com/mobile/analytics/
WWDC
›
https://developer.apple.com/wwdc/
Design Guides and Resources
›
https://developer.apple.com/design/
Transcripts of WWDC sessions
›
http://asciiwwdc.com
Cocoa with Love
›
http://cocoawithlove.com/
Cocoa Dev Central
›
http://cocoadevcentral.com/
NSHipster
›
http://nshipster.com/
Style Guides
›
Google Objective-C Style Guide
›
NYTimes Objective-C Style Guide
Useful Tools and Services
›
Charles Web Debugging Proxy
›
Smore
Advertisement
V2EX
›
iDev
在 macOS 和 Swift 3.0 中如何修改 NSTableRowView row 的 highlight 后的背景颜色
fundon
·
Aug 8, 2016
· 4460 views
This topic created in 3740 days ago, the information mentioned may be changed or developed.
尝试了 drawSelection , selectionHighlightStyle 都不能自定义用颜色
macOS
highlight
row
Swift
8 replies
•
2016-08-10 21:40:08 +08:00
fundon
OP
Aug 8, 2016
1
自己解决了。
xjbeta
Aug 9, 2016
2
求分享代码 stack overflow 上找的 大多不怎么理想 和原来的蓝色相差挺大
fundon
OP
Aug 10, 2016
3
@
xjbeta
https://gist.github.com/fundon/02a0fab262abbae82786a2af570bdf47
fundon
OP
Aug 10, 2016
4
@
xjbeta
记得把 rowView 的 selectionHighlightStyle 设置为 .none
xjbeta
Aug 10, 2016
5
@
fundon
和 Alternating rows 一起用有点小问题 而且不支持多选 :P
fundon
OP
Aug 10, 2016
6
@
xjbeta
好,我现在的需求只要单选。找到解决方案分享下 :)
xjbeta
Aug 10, 2016
7
思路是 把 row 换成 selectedIndexs 然后用 foreach 遍历 修改每个 view 的颜色
放在 tableViewSelectionIsChanging 里 这个通知有时候蜜汁不会调用
放在 tableViewSelectionDidChange 里 又有点慢半拍的感觉
fundon
OP
Aug 10, 2016
8
tableViewSelectionDidChange 肯定慢半拍
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1764 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 46ms ·
UTC 17:20
·
PVG 01:20
·
LAX 09:20
·
JFK 12:20
♥ Do have faith in what you're doing.
❯