Skip to content

Commit d8a443c

Browse files
committed
Merge pull request #13 from plzen/fix_app_crash_ios9
Fixed app crash with loading xib from bundle in iOS 9
2 parents 6f5cea7 + 789050b commit d8a443c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Classes/ViewController/KMAccordionTableViewController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ - (id)sectionAtIndex:(NSInteger)index
117117

118118
- (void)setupTableView
119119
{
120-
UINib *sectionHeaderNib = [UINib nibWithNibName:NSStringFromClass([KMSectionHeaderView class]) bundle:nil];
120+
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"KMAccordionTableViewController" ofType:@"bundle"];
121+
NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
122+
UINib *sectionHeaderNib = [UINib nibWithNibName:NSStringFromClass([KMSectionHeaderView class]) bundle:bundle];
121123
[self.tableView registerNib:sectionHeaderNib forHeaderFooterViewReuseIdentifier:SectionHeaderViewIdentifier];
122124
[self.tableView setBounces:NO];
123125
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];

0 commit comments

Comments
 (0)