bhavya kothari
bhavya kothari

Reputation: 7474

Setting transition to partial curl programmatically/code

In StoryBoard we can set it visually as below

enter image description here

How can we do the same thing using .Xib/nib file ?

[self presentViewController:self.infoController animated:YES completion:nil];

Above code is just using modal style but how to set transition style to Partial Curl.

Upvotes: 2

Views: 1791

Answers (1)

Dilip Manek
Dilip Manek

Reputation: 9143

You can do this using this code:

    #import "InfoController.h"

   - (IBAction)goToSecond:(id)sender { 
         InfoController *vc = [[InfoController alloc] initWithNibName:@"InfoController" bundle:nil];
         vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
         [self presentViewController:vc animated:YES completion:^{
           //completion code here
         }];
     }

Upvotes: 6

Related Questions