iOS友盟分享面板无法弹出问题

友盟官方给出的问题原因如下

问题可能有下面的原因:

  1. 创建Xcode项目会默认添加Main.storyboard作为Main Interface(General - Deployment Info),也就是项目的主Window。

  2. 如果没使用Main.storyboard而又另外在AppDelegate中创建了UIWindow对象,如

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]

如果项目中同时出现Main Interface以及代码创建UIWindow会导致分享面板无法正常弹出,解决方法是移除其一即可。如果移除了Main.storyboard,需要clean工程后再重新运行。

具体解决办法:
1.删除main


iOS友盟分享面板无法弹出问题_第1张图片
WX20170620-095505.png

2.appdelegate中创建window
DLauchMovieViewController *Vc = [[DLauchMovieViewController alloc]init];
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
window.rootViewController = Vc;
self.window = window;
[self.window makeKeyAndVisible];

3.友盟分享弹出面板操作放到主线程中

iOS友盟分享面板无法弹出问题_第2张图片
WX20170620-095657.png

你可能感兴趣的:(iOS友盟分享面板无法弹出问题)