0

I'm developing a custom class. The goal is user will add a UITableViewController to the storyboard and set its class to mine. and my class will fill the tableView.

Here's my question: I want to give the user to set some attributes like header color, etc in storyboard, but @IBdesignable can't be used for UITableViewController

Any idea?

Phyber
  • 1,368
  • 11
  • 25

1 Answers1

0

I think the easiest solution is to subclass a UITableView instead of UITableViewController.

Maxime
  • 1,332
  • 1
  • 15
  • 43
  • My library will have some other view controllers. maybe the best approach is if user want to change some attributes he subclass my class and set that for UITableViewController class – Hosein Abbaspoor Jul 31 '17 at 09:19
  • You can also use a UITableViewController and a protocol to oblige user to implements variables or method. For example a method which return the header background color. – Maxime Jul 31 '17 at 09:25
  • Huh!? Why do you need to subclass UITableView? – El Tomato Jul 31 '17 at 11:41