Search code examples
objective-ciosuimodalpresentationstyle

setModalTransitionStyle and setModalPresentationStyle, set size of view


I create a UIViewController (a custom calendar and its size is 550x440) and when i push a button it must be appear; the problem is that if I use setModalPresentationStyle and setModalTransitionStyle they change size of my view; can I set the size for these presentation?


Solution

  • I find a solution:

    [self presentModalViewController:calendar animated:YES];
    
    calendar.view.superview.frame = CGRectMake(0, 0, 200, 200);