Skip to content

Commit

Permalink
Removes Swift namespace from nibName. Now the method pathForResource:…
Browse files Browse the repository at this point in the history
…ofType: works with Swift
  • Loading branch information
felipelc committed Jul 21, 2015
1 parent 72ff019 commit 4516de1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions FXForms/FXForms.m
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,9 @@ - (UITableViewCell *)cellForField:(FXFormField *)field
//don't recycle cells - it would make things complicated
Class cellClass = field.cellClass ?: [self cellClassForField:field];
NSString *nibName = NSStringFromClass(cellClass);
if ([nibName rangeOfString:@"."].location != NSNotFound) {
nibName = nibName.pathExtension; //Removes Swift namespace
}
if ([[NSBundle mainBundle] pathForResource:nibName ofType:@"nib"])
{
//load cell from nib
Expand Down

0 comments on commit 4516de1

Please sign in to comment.