ios - how to make a single class for table view and inherit in all other classes? -
i want have table view in around 5 screens same layout. should best approach? should make single class , inherit other view controllers class? or make table view in each screens separate coding?
you should create subclass of uitableviewcell , use cell layout through app.
if need uitableview have same properties throughout, create uitableview extension (in swift)
extension uitableview { class func defaulttableview() -> uitableview { let tableview = uitableview() // setup default tableview properies here return tableview } }
Comments
Post a Comment