public final class CupertinoPageTransition
- Object
- Transition
- CupertinoPageTransition
ImplementsAnimation
The iOS page push: two pages moving at different speeds, over different distances.
A plain slide holds the two pages a fixed screen apart and moves the pair, which makes them one rigid object. This transition is the reason iOS depth reads the way it does: the arriving page crosses the WHOLE screen while the page it covers drifts only a THIRD of it, and each rides its own curve. The gap between them closes as they travel, which is what says one is in front of the other.
Sliding both the full distance is not a subtle difference. A third of the way through a push the strip of the old page still showing is not dimmer or shifted – it is a different PART of that page: measured against the reference at 150ms of a 500ms push on a 1125px screen, the old page belongs 270px to the left and ours had it 855px to the left, so the visible strip showed its far edge where the reference shows its middle.
Methods
public static CupertinoPageTransition create(int duration) | Creates the transition. |
public int getDuration() | The push duration in milliseconds. |
public boolean isBack() | Whether this instance plays the way BACK, with the roles of the two pages swapped. |
public void initTransition() | Callback thats invoked before a transition begins, the source form may be null for the first form in the application. |
public boolean animate() | Allows the animation to reduce “repaint” calls when it returns false. |
public void paint(Graphics g) | Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature. |
public void cleanup() | Optional operation to cleanup the garbage left over by a running transition |
public Transition copy(boolean reverse) | Create a copy of the transition, usually the transition used is a copy. |
Inherited methods
Method details
create
public static CupertinoPageTransition create(int duration)Parameters
durationint- the push duration in milliseconds
Returns
getDuration
public int getDuration()Returns
isBack
public boolean isBack()Returns
initTransition
public void initTransition()animate
public boolean animate()com.codename1.ui.Display class.Returns
paint
public void paint(Graphics g)Parameters
gGraphics- graphics context
cleanup
public void cleanup()copy
public Transition copy(boolean reverse)Parameters
reverseboolean- creates a new transition instance with “reverse” behavior useful for signifying “back” operations