I am using a UIViewController and I use presentModalViewController:controllerr animated:YES to present it but I would like if it would slide down from the top of the screen instead of up from the bottom, any way to do this?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
I created a function for pushing the
ViewControllers
from all 4 directions:The header file contains the following:
I use the following code to animate a viewController in from the top.
It adds the
UIView
of themodalViewController
to themainViewController
, animates it in, then removes theUIView
from themainViewController
andpresentsViewController:
without animation.What you're describing isn't a built-in transition style; see here for a list of those that Apple provides. If you absolutely need your view controller to appear this way, you'll have to animate it yourself.
You have to
#import
theQuartzCore
framework and add the transition animation, then change:animated:YES
to:animated:NO
.