I'm trying to write an extension, to change UIControl
components font size
extension UIViewController {
func changeFontSize(){
for v in self.view.subviews{
var fontSize = CGFloat(10)
if let V = v as? UIButton {V.titleLabel?.font = V.titleLabel?.font.withSize(fontSize)}
if let V = v as? UILabel {V.font = V.font.withSize(fontSize)}
if let V = v as? UITextField {V.font = V.font?.withSize(fontSize)}
}
}
My problem is with some components like UITableView , how can I access the cells elements, and the UITableView Section header components so that I make the extension also change all subviews of all types texts fonts ?