Reputation: 247
myTVcontroller is a tableview controller, l want to create this instance in my custom cell to aid with my custom delegation to update a UILabel e.g.
instance.delegate = yes
But l don't know how and what to put inside the brackets, can you show me a sample please.
Upvotes: 0
Views: 112
Reputation: 25459
Init with coder is used when you create instance of UIView (or subclass like table view) from xib/storyboard and this init with coder mostly is override in subclass to do some custom initialisation.
If you want to create table view controller in code use init with style:
myTVController(style: UITableViewStyle.Plain)
Upvotes: 1