BViewController *vc = [BViewControllernew];
vc.modalTransitionStyle =UIModalTransitionStyleFlipHorizontal;
if ([[UIDevicecurrentDevice].systemVersionfloatValue] >= 8.0) {
vc.providesPresentationContextTransitionStyle =YES;
vc.definesPresentationContext =YES;
vc.modalPresentationStyle =UIModalPresentationOverCurrentContext;
[selfpresentViewController:vc animated:YEScompletion:nil];
} else {
self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
[selfpresentViewController:vc animated:NOcompletion:nil];
}