我正在以这种方式创建一个viewcontroller:
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"PhotoViewControlleriPhone" bundle:nil]; UIViewController *vc = [sb instantiateInitialViewController]; vc.view.backgroundColor = [UIColor clearColor]; self.modalPresentationStyle = UIModalPresentationCurrentContext; [self presentModalViewController:vc animated:NO]; vc.view.frame = CGRectMake(imageView.frame.origin.x,imageView.frame.origin.y + 64,imageView.frame.size.width,200.000000); vc.view.layer.cornerRadius = 10; // this value vary as per your desire vc.view.clipsToBounds = YES;
viewcontroller不是全屏,因此您仍然可以看到前一个.我想能够看到它,但锁定它.就像当你使用ios facebook分享时,你会看到背景,但它会变得更暗,你无法与之交互.我怎样才能做到这一点?