1

I want to display the modal view controller when button is clicked.I added the following code for show the dialog

Login *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"login"];
vc.view.backgroundColor = [UIColor clearColor];        
self.navigationController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:vc animated:YES completion:nil];

Where Login is the class name.But it doesn't worked for me.

And i am following this link Display clearColor UIViewController over UIViewController solution also didnt work. enter image description here

Community
  • 1
  • 1
Kalai
  • 459
  • 2
  • 7
  • 20

4 Answers4

0

"NOTICE: The bad news is that the above solution doesn't work on iOS 7. The good news is that I fixed the issue for iOS7! via https://stackoverflow.com/a/11252969/1344459"

You may see my solution for the above issue in iOS7: https://github.com/hightech/iOS-7-Custom-ModalViewController-Transitions

I hope that helps you.

Community
  • 1
  • 1
hightech
  • 3,654
  • 3
  • 22
  • 34
0

I think the best way to do that is using blurry modal segue.

https://github.com/Citrrus/BlurryModalSegue

jturolla
  • 5,837
  • 6
  • 24
  • 40
0

Use this https://stackoverflow.com/a/18949734/2066428

It works great on iOS7 also. Note that it also works on iPhone while someone doubt.

Community
  • 1
  • 1
malex
  • 9,374
  • 3
  • 53
  • 71
0

You can use custom UIViewController transitions with iOS 7 to do what you want.

http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/

Snowman
  • 29,431
  • 43
  • 165
  • 290