loading NSBundle files on iOS

前端 未结 2 1763
栀梦
栀梦 2020-12-04 08:11

I\'d like to create a project that has a very flexible graphical user interface (skinnable). In order to make this possible, I\'d like to load a NSBundle from an ex

2条回答
  •  醉酒成梦
    2020-12-04 08:27

    untested.

    You can distribute all the content in a zip file, unzip using SSZipArchive.

    NSBundle* bundle = [NSBundle bundleWithPath:absolutePathToNibFile].
    
    UIViewController* vc = [[[MyViewController alloc] initWithNibName:@"mycustomnib" bundle:bundle] autorelease];
    

提交回复
热议问题