//要先是window可视化

[self.window makeKeyAndVisible];

//添加友盟分享
[[UMSocialManager defaultManager] openLog:YES];

//[UMSocialGlobal shareInstance].isUsingWaterMark = YES;
[UMSocialGlobal shareInstance].isClearCacheWhenGetUserInfo = NO;

/* 设置友盟appkey */
[[UMSocialManager defaultManager] setUmSocialAppkey:@"**************"];

[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;

[[UIApplication sharedApplication] setStatusBarHidden:NO];

//最后是根路径设置

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.rootTabBarController = [[RootTabBarController alloc] init];
self.window.rootViewController = self.rootTabBarController;

return YES;

//注意在里面  先初始化应用窗口 再初始化友盟  最后设置根控制器,如果先设置根控制器 再初始化友盟 会造成友盟分享初始化无效  无法弹出面板 appDelegate类里面主要是找到应用得根控制器,按照上面的代码写就可以

05-11 14:42