UIViewController *vc = [UIViewController alloc] init];
 if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0)
 {
   vc.definesPresentationContext = YES;
   vc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
   [self presentViewController:vc animated:NO completion:nil];
 }
 else
 {
   self.modalPresentationStyle = UIModalPresentationCurrentContext;
   [self presentViewController:vc animated:NO completion:nil];
 }
 Source
Advertisements