You can initialize the view with a frame that is positioned off screen and then use implicit animation to bring it in. Alternatively, a subtler approach would be to animate it's appearance in by animating the change in alpha value from 0 to 1. For instance -

scanView.alpha = 0.0;

[UIView beginAnimations:@"fadein" context:nil];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDelegate:self];
// Change any animatable properties here
scanView.alpha = 1.0;
[UIView commitAnimations];      

Note that if you do want to accomplish the effect you're after, you can't directly animate the view's frame property but should instead modify its position. Take a look at the Core Animation Programming Guide (specifically, animatable properties) for more information.

-rob.

On Jan 8, 2009, at 1:22 PM, fc...@dialup4less.com wrote:

Background:
@interface ScanView : EAGLView <AbstractViewProtocol, ScannerDelegate> <--- subclass of UIView.

---------

The following code is typical for loading the 'scanView' subView into its parent window:

[window addSubview:scanView]; // ...this is what I'm doing now.

The end result is a brief flash of void/black background before the view is displayed.

I want to avoid this by animating the appearance/entrance of 'scanView' before the user.
For example, sliding from the right --> left into view.

I'm not sure how to tackle this.
Any ideas would truly be appreciated!

Ric.
<I'm assuming that iPhone's NDA has ended, hence use of Cocoa Dev forum>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rob%40pinchmedia.com

This email sent to r...@pinchmedia.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to