Added: 2 years ago
From: NWorksDev
Views: 21,507
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (17)

Sign In or Sign Up now to post a comment!
  • how can you do this with a mutable array so that it will display the images randomly?

    how can you code this if you want to compare if a user clicked on the right image (GAME)?

  • can you teach me

  • is not semicolon is coma!!!!!!!!!!!!!!!!!!!

  • @Chibaboy79 he fixed it -.-

  • Not works with simulator Iphone 4 apears "Expected ']' before';' token and

    Missing sentinel in function call

  • @Chibaboy79 here's what it should be player.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"run1.png"], [UIImage imageNamed:@"run2.png"], [UIImage imageNamed:@"run3.png"], [UIImage imageNamed:@"run4.png"], [UIImage imageNamed:@"run5.png"], [UIImage imageNamed:@"run6.png"],nil]; player.animationDuration = 1; player.animationRepeatCount = 0; [player startAnimating];

  • All that crap to animate 3 pictures -;l

  • It works perfect! You are awesome. Keep it up!

  • Hm, didnt work for me with 4.0? Any change you can post the code itself?

  • @ploglet

    I am on 4.o as well and it works only in the simulator. Loaded on iPhone it is blank in the view.

  • @ronbowalker Photo file type must be PNG.

  • Nice tutorial. I was wondering if you were gonna catch those ; You saved them until the end for dramatic effect. One quick correction: Duration != Duratation :P

  • i have 5 Errors & 3 Warnings! I dont´t know why?!

    I do the same what you do!?

    Please help!

  • man u d best.

  • I've got a 2 view app, so is there a way to make it play at a button? cus otherwise im kinda screwed

  • @richifie not sure if you want to play it inside the button or start playing when the button is pressed...

    if you want to play after a button was pressed, just put the start animating in the function your button click will call.

    if you want to play inside the button, change the [self.view addSubview.....

    to [button_name.view addSubview ....

    or something along these lines....i havent tryed this, but it should work, since everything thats visible is a view, so you can add a subview to it ;)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more