XShareController *share = [self.storyboard instantiateViewControllerWithIdentifier:@"XShare"];
[share setData:[NSMutableDictionary dictionaryWithDictionary:self.data]];
DLog(@"shareTouch");
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) {
UIViewController *controller = [[self.view window] rootViewController];
if (controller) {
[controller setModalPresentationStyle:UIModalPresentationCurrentContext];
[self presentViewController:share animated:YES completion:^{
[controller setModalPresentationStyle:UIModalPresentationFullScreen];
}];
}
}else{
[share setModalPresentationStyle:UIModalPresentationOverCurrentContext];
[self presentViewController:share animated:YES completion:nil]; }我这样写有问题吗,XShareController是我在sb中创建的一个vc,这样写在8.0以上跳转运行到最后一句[self presentViewController:share animated:YES completion:nil];就崩,哪位大神知道原因帮我解答下
[share setData:[NSMutableDictionary dictionaryWithDictionary:self.data]];
DLog(@"shareTouch");
if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) {
UIViewController *controller = [[self.view window] rootViewController];
if (controller) {
[controller setModalPresentationStyle:UIModalPresentationCurrentContext];
[self presentViewController:share animated:YES completion:^{
[controller setModalPresentationStyle:UIModalPresentationFullScreen];
}];
}
}else{
[share setModalPresentationStyle:UIModalPresentationOverCurrentContext];
[self presentViewController:share animated:YES completion:nil]; }我这样写有问题吗,XShareController是我在sb中创建的一个vc,这样写在8.0以上跳转运行到最后一句[self presentViewController:share animated:YES completion:nil];就崩,哪位大神知道原因帮我解答下
UINavigationController *productNav = [productStoryboard instantiateViewControllerWithIdentifier:@"productNAV"];
[self presentViewController:productNav animated:YES completion:^{}];
没有用,还是会在最后跳转代码时崩溃,其实之前也有一个文件用了相同的跳转是可以的,在这就会崩,我比对了几次也没发现有不同的地方
问题解决了么 ,求分享啊
else里的代码会在8.0以上时调用,我测试过了,应该没有问题的,其实这段代码,在别的地方也调用过,么有问题,但是在这就会最后崩,我检查好多遍也没检查出来不同