Skip to content

Instantly share code, notes, and snippets.

@macmade
Created January 24, 2012 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macmade/1672460 to your computer and use it in GitHub Desktop.
Save macmade/1672460 to your computer and use it in GitHub Desktop.
GenericViewController
@interface GenericViewController: UIViewController
{}
@end
@implementation GenericViewController
{
- ( id )init
{
NSString * className;
NSString * nibName;
className = NSStringFromClass( [ self class ] );
nibName = [ className substringToIndex: className.length - 10 ];
if( ( self = [ super initWithNibName: nibName bundle: nil ] ) )
{}
return self;
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment