diff --git a/SSManagedTableViewController.h b/SSManagedTableViewController.h index f205b26..85dfa1b 100644 --- a/SSManagedTableViewController.h +++ b/SSManagedTableViewController.h @@ -13,7 +13,7 @@ @interface SSManagedTableViewController : SSManagedViewController -@property (nonatomic, retain) UITableView *tableView; +@property (nonatomic, strong, readonly) UITableView *tableView; @property (nonatomic) BOOL clearsSelectionOnViewWillAppear; - (id)initWithStyle:(UITableViewStyle)style; diff --git a/SSManagedTableViewController.m b/SSManagedTableViewController.m index d40ca26..2e1f9b4 100644 --- a/SSManagedTableViewController.m +++ b/SSManagedTableViewController.m @@ -32,8 +32,11 @@ - (void)dealloc { #pragma mark - UIViewController - (void)loadView { - _tableView.frame = [[UIScreen mainScreen] applicationFrame]; - self.view = _tableView; + [super loadView]; + + // Add the table view as a subview for increased flexibility + _tableView.frame = self.view.bounds; + [self.view addSubview:_tableView]; }