Results 1 to 2 of 2
Discuss controling animation at the iPhone Developer Exchange - Hackint0sh.org; HI, i have a small question where can I find some help to make a ...
  1. #1
    Advanced Array

    Join Date
    Dec 2007
    Posts
    45
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Exclamation controling animation

    HI, i have a small question
    where can I find some help to make a slide like the picture down here to control the movement of my animation (png secuence)
    the animation are 10 small png pictures.....(secuence)

    let me explain again (in other words)
    if you slide the finger to the right (100%), show the png number 10
    if you slide the finger to 75% on the slide, then show the png number 7
    or if you slide the finger to the 20% of the slide, then show the png number 2

    etc ... etc

    is that posible?
    some idea or suggestion please....
    any are welcome !



  2. #2
    Senior Professional Array

    Join Date
    Sep 2007
    Posts
    370
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    28

    Default

    Hi,

    Sure this is possible.

    I'm not at my Mac now but i'll try to reply from memory, therefore just use it as a guide.

    Firstly, check out the UI Catalog sample code. This will help you build and install the slider. You will see that there is a delegate method which is called when the slider moves.

    Note: The slider values goes from 0 to 1. So you're going to need to do something like this

    - (void) this_is_the_slider_delegate: (float)value {
    // look up this delegate from the UI Catalog
    int imageNum = trunc(value*10); // here you times the slider value by 10 and then cut off the remainder. This will give you the image number
    NSString *imgName = [NSString stringWithFormat:@"%d.png",imageNum]; // here you specify the name of the image to be used
    myImgView.image = [UIImage imageNamed:imgName]; // finally update the image inside the image view
    }
    Hope this helps.

 

 

Similar Threads

  1. Flip Animation
    By computerartist in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 09-09-2010, 02:49 AM
  2. MacNN: First Look: Animation-ish, animation creation
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 06-05-2008, 07:00 AM
  3. MacNN: Animation-Ish offers easy, DIY animation
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 05-29-2008, 06:10 AM
  4. Iphone animation
    By ujustwonacruz in forum General
    Replies: 1
    Last Post: 04-22-2008, 04:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 02:08 AM.
twitter, follow us!