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

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -