// // UIViewController+StoryBoard.m // Patrol // // Created by 曹云霄 on 2017/7/20. // Copyright © 2017年 上海勾芒科技信息有限公司. All rights reserved. // #import "UIViewController+StoryBoard.h" @implementation UIViewController (StoryBoard) + (instancetype)viewControllerWithStoryBoardType:(STORYBOARD_TYPE_)type { NSString *identifier = NSStringFromClass(self); UIStoryboard *storyboard; switch (type) { case STORYBOARD_TYPE_MAIN: { storyboard = [UIStoryboard storyboardWithName:@"OppleMain" bundle:nil]; break; } case STORYBOARD_TYPE_ANNOUNCEMENT: { storyboard = [UIStoryboard storyboardWithName:@"Announcement" bundle:nil]; break; } case STORYBOARD_TYPE_GUIDEINTERGRAL: { storyboard = [UIStoryboard storyboardWithName:@"GuideIntegral" bundle:nil]; break; } case STORYBOARD_TYPE_LEARNINGCENTER: { storyboard = [UIStoryboard storyboardWithName:@"LearningCenter" bundle:nil]; break; } case STORYBOARD_TYPE_USER: { storyboard = [UIStoryboard storyboardWithName:@"UserStoryboard" bundle:nil]; break; } } return [storyboard instantiateViewControllerWithIdentifier:identifier]; } @end