FAQ Database Discussion Community


adding a custom transition to presentViewController in swift

ios,iphone,swift,uiviewanimationtransition
i have a viewController which has a TableView and a cell with a accessoryType of detailbutton. When pressing that accessoryType i present a semi transparent View with text. I want this view to appear in a specific way so i created a custom view controller. However trying to run that...

Is it possible to animate UIEdgeInsets?

ios,swift,animation,uitextfield,uiviewanimationtransition
I've been trying to animate a change in UIEdgeInsets. I've already tried using UIView.animateWithDuration and the insets just jump to the final values. Does anyone know if this a property that can't be animated? Or better yet, is anyone aware of a way to animate insets? As an example: //...

When using [UIViewControllerTransitionCoordinator animateAlongsideTransition:completion:] in a modal presentation, the animation block is not called

ios,objective-c,uiviewcontroller,modalviewcontroller,uiviewanimationtransition
I have a UIViewController that is being presented via a modal segue in a storyboard (embedded in a UINavigationController). I'm trying to animate the keyboard appearance alongside the modal presentation (logic for this is beyond the scope of the question). I'm using [self.transitionCoordinator animateAlongsideTransition:completion:] in viewWillAppear: to do this but...

Permanently move a frame of custom UIView on screen

ios,objective-c,uiviewanimationtransition
I'm having a little problem about animations on iOS with Objective-c. I'm trying to create a card game, and as the game start, the deck distributes the cards on the table, with an animation. The problem is that at the beginning the cards are all in row in the bottom...

Swift - UIView.transitionFromView -

swift,uiview,uiviewanimation,uiviewanimationtransition
What happens to your “fromView” after you use UIView.transitionFromView? How do you get it back? (re-initialize it?). Here’s a simple example I made and get “fatal error: unexpectedly found nil while unwrapping an Optional value” when I try to get back to the “fromView” or reference a label on it,...

How to have a better transition between controllers for the navigation bar?

ios,swift,uinavigationbar,uiviewanimationtransition
When I'm in the 2nd view controller and I press the back button, the navigation bar disappears brutally. I would like it to slide away from the screen with the view controller. And when I press a button to go to the 2nd view controller, the navigation bar appears before...

How to implement UIViewControllerContextTransitioning compatible with interactive transitions

ios,uinavigationcontroller,uiviewanimation,uiviewanimationtransition
I am on my way to create a custom navigation controller. Indeed, I would like to have a UINavigationController with a "content view" which is not necessarily the full screen, but which can be any view. Since I also would like to use custom animations for transitions and interactive transitions,...

Segues vs. UIViewControllerAnimatedTransitioning

ios,ios8,uistoryboardsegue,uiviewanimationtransition
While searching how to perform custom animations when transitioning from one controller to another I found some info about UIViewControllerAnimatedTransitioning. So the question is: why do we even need this if we have custom segues? Are they interchangeable or not? If yes, why does Apple provide two ways of doing...

Animation ends with error in custom interactive transitioning animation?

ios,core-animation,uiviewanimationtransition
I am setting up a custom transitioning animation. Everything works fine except the error at the end of the animation: As you see, after the interactive animation, the animation just excutes again. This is the method i use to handle the the interactive gesture in the class the conforms to...

Action on UIAlertController that does not dismiss AlertController? (Disable dismissing)

ios,objective-c,cocoa-touch,uiviewanimationtransition,uialertcontroller
I have an action sheet (UIAlertController with style of UIAlertControllerStyleActionSheet) with a few actions, presented on an iPad as a popover. What I want is, when a user selects one of the options (say, the first one), I want the action sheet to transition to a different action sheet, using...