Skip to content

Instantly share code, notes, and snippets.

@leviathan
Created January 7, 2011 14:53
Show Gist options
  • Save leviathan/769539 to your computer and use it in GitHub Desktop.
Save leviathan/769539 to your computer and use it in GitHub Desktop.
Loading a custom UIView class with a custom nib file.
QPickOneView* myView = nil;
NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"QPickOneView" owner:self options:nil];
for (id currentObject in nibViews) {
if ([currentObject isKindOfClass:[QPickOneView class]]) {
myView = (QPickOneView *) currentObject;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment