Hello,
I'm trying to configure the the of the UITableView but without success. The variable tableViewStyle in FormViewController is private so I cannot set it from a subclass, also I cannot use the convenience init from an init of the subclass (it cannot be done in Swift).
Is there another way? If not the convenience initialiser could become a standard one so a sub class can override it.
Let me know what are thoughts
Thanks,
Dem
Being the one who added the property I can confirm that I only tested it from Objective-C.
Making the property public to be overridden would probably be the easiest route to take.
Hello,
thanks for replying so fast. Yes that would make things easier too.
That's the workaround I've used in the meantime:
override func viewDidLoad() {
if tableView == nil {
tableView = UITableView(frame: view.bounds, style: UITableViewStyle.Plain)
tableView?.autoresizingMask = UIViewAutoresizing.FlexibleWidth.union(.FlexibleHeight)
}
super.viewDidLoad()
// my code ...
}
Dem
@demetrio812 @mikaoj I deleted the convenience modifier.
@mtnbarreto and how i can now set tableViewStyle? Without workaround.
@mtnbarreto is there now an answer to @andertsk 's question? cheers.
Most helpful comment
@mtnbarreto and how i can now set tableViewStyle? Without workaround.