Skip to content

Commit

Permalink
Fixed app crash with loading xib from bundle in iOS 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Voronin committed Oct 19, 2015
1 parent 6f5cea7 commit 789050b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/ViewController/KMAccordionTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ - (id)sectionAtIndex:(NSInteger)index

- (void)setupTableView
{
UINib *sectionHeaderNib = [UINib nibWithNibName:NSStringFromClass([KMSectionHeaderView class]) bundle:nil];
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"KMAccordionTableViewController" ofType:@"bundle"];
NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
UINib *sectionHeaderNib = [UINib nibWithNibName:NSStringFromClass([KMSectionHeaderView class]) bundle:bundle];
[self.tableView registerNib:sectionHeaderNib forHeaderFooterViewReuseIdentifier:SectionHeaderViewIdentifier];
[self.tableView setBounces:NO];
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
Expand Down

0 comments on commit 789050b

Please sign in to comment.