Revision history for ViewTransition

Revision [359]

Last edited on 2009-09-09 11:37:33 by JohnMcIntosh
For the RotateViewFrom:... it's Objective-C code hung off the Application delegate.
- (void) rotateViewFrom: (UIView *) fromView toView: (UIView*) toView animationDuration: (double) animationDuration animationTransition: (int) animationTransition curve: (int) curve cached: (BOOL) cachedFlag {
UIView * superViewtoUse = [fromView superview];
[UIView beginAnimations: nil context: nil];
[UIView setAnimationDelegate: self];
[UIView setAnimationWillStartSelector: @selector (animationWillStart:context:)];
[UIView setAnimationDuration: animationDuration];
[UIView setAnimationCurve: curve];
[UIView setAnimationTransition: animationTransition forView: superViewtoUse cache: cachedFlag];
[fromView removeFromSuperview];
[superViewtoUse addSubview: toView];
[UIView commitAnimations];

Revision [358]

Edited on 2009-09-09 11:35:43 by JohnMcIntosh
To create the controller we just load the nib file "InfoView" next we need to adjust the Done button behavior
First we have to get the menuBar, we have in the nib file placed the menu bar then assigned a TAG number, so we can ask for component number 5.
Then we ask for the topItem's rightBarButtonItem. This is all UIKit work so note how it's performed in a performSelectorOnMainThread: block.
we then setup the MyApplicationSqueakProxySubClass instance we have called squeakProxy to understand that on a button tap it should send the message infoViewDoneButtonWasPressed: to the MyApplicationSqueakProxySubClass instance's squeakProxy instance var.
So when the person taps the button then
MyApplicationSqueakProxySubClass>>infoViewDoneButtonPressed: aValue
infoViewDoneButtonPressed := aValue
self infoViewDoneButtonPressed ifTrue:
[self infoViewDoneButtonPressed: false.
ui doTransitionToStatusViewFromInfoView].
which follows the same pattern as the infoButtonPressed logic
Where we rotate the keypad view back into place. Then we'e made an explicit decision to release the infoViewController and set it to nil in order to
fulliy release the memory used by the controller back to Objective-C.
[self sharedApplication delegate
rotateViewFrom: self infoViewController view
toView: self keypadController view
animationTransition: 1
cached: false asObjc.
self sharedApplication setStatusBarHidden: true asObjc animated: true asObjc.
self infoViewController release.].
self infoViewController: nil.
To create the controller we just load the nib file "InfoView"

Revision [357]

The oldest known version of this page was created on 2009-09-09 11:25:13 by JohnMcIntosh
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki