title: How load the correct UIViewController with a shared storyboard design?
body: <p>I have designed a screen in a storyboard that is subclassed by several controllers. The design is the same for all of them.</p>
  
  <p>Now, I need to load the screen. According to <a href="https://stackoverflow.com/questions/9896406/how-can-i-load-storyboard-programmatically-from-class">How can I load storyboard programmatically from class?</a>, I do:</p>
  
  <pre><code>UIStoryboard *b = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
  SearchViewController *c = [b instantiateViewControllerWithIdentifier:@"SearchViewController"];
  
  return c;
  </code></pre>
  
  <p>However, this load the base class, not the subclass. (Baseclass is SearchViewController, subclass is SearchCustomerViewController). What I can do?</p>
  
  <p>P.D: This is how is the code of the base class and subclass:</p>
  
  <pre><code>@interface SearchViewController : UIViewController
      &lt;SqliteDataSource&gt;
  
  - (IBAction)showMenu:(id)sender;
  - (IBAction)addNew:(id)sender;
  
  - (id)initWithRouterParams:(NSDictionary *)params;
  
  @property (strong, nonatomic) NSDictionary *params;
  
  @property (weak, nonatomic) IBOutlet SearchBar *editSearch;
  @property (weak, nonatomic) IBOutlet UITableView *searchResults;
  @property (weak, nonatomic) IBOutlet UIToolbar *barActions;
  
  + (id)load:(Class)name;
  
  @end
  
  @implementation SearchViewController
  
  + (id)allocWithRouterParams:(NSDictionary *)params {
      UIStoryboard *b = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      SearchViewController *c = [b instantiateViewControllerWithIdentifier:@"SearchViewController"];
  
      return c;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      self.editSearch.hideTable = NO;
      [self.editSearch becomeFirstResponder];
  }
  
  + (id)load:(Class)name {
      return [name allocWithRouterParams:nil];
  }
  
  
  @interface CustomerListViewController : SearchViewController
  
  @property (weak, nonatomic) CustomerModel *customerData;
  
  @end
  -(void) viewDidLoad {
      [super viewDidLoad];
  
      self.customerData = [CustomerModel setupController:self searchResult:self.searchResults searchCustomer:self.editSearch hideTable:NO onSelectModel:^(NSMutableDictionary *data) {
          NSInteger theId = [data[@"id"] integerValue];
  
          [self setCustomer:[[Db currentDb] loadById:[Customer class] theId:theId]];
      }];
  
      self.customerData.filter = CUSTOMER_FILTER_NONE;
  }
  </code></pre>