Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-06-2009, 10:11 PM   #1 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
Default First animation attempt - Clarification/Questions

Hello,

Currently I have a UIView, with 2x UITextViews among a few other things. I've added swipe functionality so that when the user swipes, I reload the data in the 2x UITextViews, making it look like their swiping forward or backward, respectivlye.

Now it just reassigns the values's in the .text field - No animation, so it looks rather bland, and happens really quick.

I want to add in some animation for these items, and my question is where do I start? Do I have to animate the entire UIView (its got a toolbar on the top that I really don't want animated). Can I just annimate the two UITextViews?

Where does this code go? Right now, when they swipe, I have a DB function that just retrieves the next (or previous) data, depending on the direction of the swipe.

I've included a picture of my IB: http://mr-sk.com/iphone/animation.png

Oh, and as far as the animation, I'd really like something like a page turn, or like a swift slide right/left ...

Thanks in advance,
- sk
mr-sk is offline   Reply With Quote
Old 07-07-2009, 10:27 AM   #2 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
Default

bump - any sample code, urls, etc?
mr-sk is offline   Reply With Quote
Old 07-07-2009, 07:37 PM   #3 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
Default

bump - Am I missing some information that is preventing anyone from assisting?
mr-sk is offline   Reply With Quote
Old 07-07-2009, 08:10 PM   #4 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Default

check out apple's
viewtransitions sample app.
jsd is offline   Reply With Quote
Old 07-07-2009, 08:26 PM   #5 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
Default

Quote:
Originally Posted by jsd View Post
check out apple's
viewtransitions sample app.
So, do I have to create the view's programmatically? Also, do I need two views in order to do the transitioning?

I included an image link above to the current layout of my IB file. I'd prefer to get it working within the confines of my existing layout, if possible.

Oh, and thanks for the URL.

- sk
mr-sk is offline   Reply With Quote
Old 07-07-2009, 08:43 PM   #6 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Default

Quote:
Originally Posted by mr-sk View Post
So, do I have to create the view's programmatically?
you don't have to. if you create them in IB you just need to make sure you have outlets for both of them.

Quote:
Also, do I need two views in order to do the transitioning?
You could probably fake it with one view, if you did something like:

animate frame change to make the view "disappear"
then set the new content in the existing view (which is hidden)
animate another frame change to make the view "appear"

you wouldn't ever be able to see both at the same time, and you would have to do some funky synchronization tricks to make sure that the first animation finished before kicking off the second one.
jsd is offline   Reply With Quote
Old 07-07-2009, 10:19 PM   #7 (permalink)
.38 special tucked
 
Join Date: Apr 2009
Location: Brooklyn, NY
Posts: 133
Default

Quote:
you don't have to. if you create them in IB you just need to make sure you have outlets for both of them.
I do.

Quote:
animate frame change to make the view "disappear"
then set the new content in the existing view (which is hidden)
animate another frame change to make the view "appear"
I got this code working:

Quote:
- (void)fadeScreen
{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(finishedFadi ng)];

qTextView.alpha = 0.3;
aTextView.alpha = 0.3;

[UIView commitAnimations];
}


- (void) finishedFading
{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];

qTextView.alpha = 1.0; seconds
aTextView.alpha = 1.0;

[UIView commitAnimations];
}
Which just does a fade in / fade out. I'll probably try something more difficult in a bit. Thanks for the tips jsd!
mr-sk is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, uitextview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 239
15 members and 224 guests
ADY, AragornSG, CKAmike, Dani77, Dattee, Duncan C, HDshot, HemiMG, Promo Dispenser, Punkjumper, Rudy, sacha1996, sneaky, spiderguy84, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,231
Posts: 380,768
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:18 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0