UIStroryboard分类

#import "UIStoryboard+WF.h"

@implementation UIStoryboard (WF)

+(void)showInitialVCWithName:(NSString *)name{
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:name bundle:nil];
    //WXLog(@"%@",[UIApplication sharedApplication].keyWindow);
    [UIApplication sharedApplication].keyWindow.rootViewController = storyboard.instantiateInitialViewController;
}

+(id)initialVCWithName:(NSString *)name{ UIStoryboard *storyboard = [UIStoryboard storyboardWithName:name bundle:nil]; return [storyboard instantiateInitialViewController]; } @end



posted on 2015-06-15 00:03  彪biao  阅读(115)  评论(0编辑  收藏  举报

导航