ios - Is it possible to customise the section index list in a UITableView (such as font)? -
uitableview gives ability edit colors of section index list properties such as
var sectionindexcolor: uicolor? { set } var sectionindexbackgroundcolor: uicolor? { set }
is possible edit in other ways? looking swift implementations.
it possible adjust if you're okay accessing private properties. believe pass store approval don't take word it. here properties/functions able access. https://github.com/nst/ios-runtime-headers/blob/master/frameworks/uikit.framework/uitableviewindex.h
i've tested changing font following , worked.
func viewdidload() { super.viewdidload() dispatchqueue.main.async { [unowned self] in if let tableviewindex = self.tableview.subviews.first(where: { string(describing: type(of: $0)) == "uitableviewindex" }) { tableviewindex.setvalue(*insert font here*, forkey: "font") self.tableview.reloadsectionindextitles() } } }
wiki
Comments
Post a Comment