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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -