Skip to content

Instantly share code, notes, and snippets.

@swarut
Created September 30, 2012 17:57
Show Gist options
  • Select an option

  • Save swarut/3807953 to your computer and use it in GitHub Desktop.

Select an option

Save swarut/3807953 to your computer and use it in GitHub Desktop.
Objective-C : CustomViewFactory #customview #objective-c #ui #view
@implementation CustomViewFactory
+(CustomView*)newCustomView:(NSString*)lang{
NSArray *nibs = [[NSBundle mainBundle] loadNibNamed:@"CustomView" owner:self options:nil];
CustopmView *customView;
for(UIView *view in nibs){
if([view isKindOfClass:[CustomView class]]){
customView = (CustomView*)view;
}
}
return customView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment