在静态库中的xib跳转

来源:互联网 发布:阿里云 docker收费 编辑:程序博客网 时间:2024/06/14 16:04
在静态库中的xib跳转,bundle需要设置一下路径,否则容易报错: Could not load the nib '**" NSString * rescourcePath = [[NSBundle mainBundle] pathForResource:@"LibraryResources" ofType:@"bundle"]; NSBundle * bundle =[NSBundle bundleWithPath:rescourcePath]; MyViewController * myVC =[[MyViewController alloc]initWithNibName:@"MyViewController" bundle:bundle];
0 0