Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TestView
- - (void)someFunction
- {
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
- {
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
- TestViewController *test = [[TestViewController alloc]initWithNibName:@"TestViewController" bundle:nil];
- moveNote.modalPresentationStyle = UIModalPresentationFormSheet;
- [appDelegate.splitViewController2 presentModalViewController:test animated:YES];
- test.view.superview.bounds = CGRectMake(0, 0, 540, 350);//Dimensions of ModalView.
- }
- }
- Y testViewController opens up, here I do this on click of a button
- - (void)closeTest
- {
- [self dismissViewControllerAnimated:YES
- completion:^{
- EditViewController *editViewController = [[EditViewController alloc] initWithNibName:@"EditViewController" bundle:nil];
- editViewController.modalPresentationStyle = UIModalPresentationFormSheet;
- [appDelegate.splitViewController2 presentModalViewController:editViewController animated:YES];
- editViewController.view.superview.bounds = CGRectMake(0, 0, 540, 350);//Dimensions of ModalView.
- editViewController.page = 3;
- //Call delegate function.
- }];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement