Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我真的需要为我的应用程序实现一组灰色索引栏。
目前,我正在使用一个 UITableView,我将它分成多个部分。
但是,默认部分索引具有渐变外观,我认为这是不可取的。
是否可以将索引更改为具有自定义外观,例如纯灰色外观?
如果有怎么办?谢谢!
您可以使用这些 tableView 委托或数据源(我有点模糊)方法来实现您的自定义“索引视图”(部分标题)。
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section; - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;