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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

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

Reply
 
LinkBack Thread Tools Display Modes
Old 03-08-2011, 05:55 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 18
sregorcinimod is on a distinguished road
Default iphone game - "power" bar help

Hi I am creating a game whereby two actions happen that enable a button, upon first touch of the button I need a "power" bar to scroll up and down and then on the second touch of the button the "power" bar stops scrolling and another action happens.

I have got to the stage where the button is touchable, but have no idea what you call the "power" bar control in order to search for help on how to create this.

The "power" bar is just like your traditional in game control like a sports game, where you need to set the "power" of a golf shot based on when you hit a button.

If
1) You know the name of that type of control so I can more detailed search -or-
2) You have some sample code that would show how this "power" bar can be achieved
Then it would be gratefully appreciated

Cheers
sregorcinimod is offline   Reply With Quote
Old 03-08-2011, 11:04 PM   #2 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 18
sregorcinimod is on a distinguished road
Default

So with help from a different forum, I have created a UIProgressview and animated it so that when you touch a button the animation starts and then when you touch the button again it registers the touch and stores the progress value at the time. However I now need to stop the animation of the progress bar, any ideas?

Here is my code:

(void)Buttontouched {

if (buttontouchcount == 0) {
buttontouchcount = 1;
[myProgbar setProgress: 1.0 animated: YES];
}
else if (buttontouchcount == 1) {
buttontouchcount = 2;
buttonstop = myProgbar.progress;
//this next line doesn't work
[myProgbar setProgress: buttonstop animated: NO];
//this line works
placeholder1.text = [NSString stringWithFormat:@"%f",buttonstop];

}
}
sregorcinimod is offline   Reply With Quote
Reply

Bookmarks

Tags
code, game, ios, iphone

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: 426
7 members and 419 guests
chemistry, ChrisYates, hussain1982, Retouchable, skrew88, SLIC, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

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