nstimer - iPhone Application: Create an object every second -


I am preparing an app that is basically an extension of a tutorial (I'm new to the app development world ). There was a cyan colored box running around the screen in the tutorial where you touch.

The background that I did was changed to an image view, so it looks like a deep sea and I put an ImageView inside Cyan UIView to display the white silhouette of a diver .

What do I want from this experiment / exercise to show the bubbles and disappear from the diver and seaweed for every two seconds at the bottom of the screen?

I set my timer using it, but I get all kinds of errors from the NSTimer announcement.

Here's my code:

  NSTimer * bubbleTimer; BubbleTimer = [NSTimer Scheduled Timer with Time Interval: 0.5 Target: Bulbul Selector: @Selector (Moving :) User Information: Zero Repeats: Yes];  

line NSTimer * bubbleTimer; There is no color of NSTimer, and an error has said that this bubble misses a timer in an integer.

Like I said, I am still trying to find my feet in this world so that whatever help you can give is appreciated

Edit:

Here's mine.

  #import & lt; UIKit / UIKit.h & gt; #import & lt; Foundation / Foundation. H & gt; @ Interface Touch Weave: UIView {IBOutlet UIView * stretchView; // This defines an object in the interface builder, which is called the stretch view ibotellate UIView * bubble; Annihiler * bubble timer; } @end  

and my First of all, we need a method that processes the touch of each touch screen - (zero): (nset *):

Event touches: (UIEvent *) Event {start animation} - Animation is given a name that is in this case / play and stretch [UIView startAnimations: @ "MoveAndStretch" reference: zero]; // We have set a duration for this animation in seconds [UIView set Animation Duration: 1]; // start the animation from the current state of the screen [UIView Set Animation BeginnandTrintTest: Yes]; // Any place change between animations and commute here is animated. // First of all we need to process a simple touch that if ([count touches] == 1) {// iitize a touch variable * touch = [someone touches an object]; // Change the location of the touch stretch instead of the touch stench. View. Center = [touch position: view: self]; } [UIView commitAnimations]; } - (zero) step bubble: (NSTimer *) theTimer {CGPoint Start; Start.x = 480; Start.y = 300; CGPoint End; End.x = 0; End.y = 300; Bubble.center = Start; [UIView Start Permissions: @ "Bubble" Reference: Zero]; [UIView Set Animation Duration: 2]; [UIView Set AnimationBuginFrenchTant: Yes]; Bubble.center = end; [UIView commitAnimations]; } BubbleTimer = [NSTimer scheduled timer with interval: 0.5 target: auto selector: @sillector (move bubble :) user information: zero repeats: yes]; @end

It may be your formatting, but what is the method in which ur NSTimer has been made? It appears that he is floating in himself.


Comments