iOS for High School Students: Making Your First iOS App: Part 2/2
6 posts
• Page 1 of 1
iOS for High School Students: Making Your First iOS App: Part 2/2
This is the official thread to discuss the following blog post: iOS for High School Students: Making Your First iOS App: Part 2/2
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

rwenderlich - Site Admin
- Posts: 1776
- Joined: Thu Dec 23, 2010 4:14 pm
- Has thanked: 26 times
- Been thanked: 187 times
Re: iOS for High School Students: Making Your First iOS App:
Oops!
Sorry, it seems that the page you are looking for does not exist.
Try searching to see if you can find it that way!
Sorry, it seems that the page you are looking for does not exist.
Try searching to see if you can find it that way!
Re: iOS for High School Students: Making Your First iOS App:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Time is up!"
message:[NSString stringWithFormat:@"You scored %i points",count]
delegate:self
cancelButtonTitle:@"Main Menu"
otherButtonTitles:nil];
[alert show];
On my end I have a main menu and I can press Play and the game will start and whatever how would I make the text that pops up after the time runs out be able to say Play Again or Main Menu?
Also how would I be able to add the same background color to the menu as in the game's interface?
Thanks in advance for the help!
-EDIT-
I did find out how to make another button, now I just need to know how to be able to link it to the Main Menu.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Time is up!"
message:[NSString stringWithFormat:@"You scored %i points",count]
delegate:self
cancelButtonTitle:@"Play Again"
otherButtonTitles:@"Main Menu", nil];
[alert show];
message:[NSString stringWithFormat:@"You scored %i points",count]
delegate:self
cancelButtonTitle:@"Main Menu"
otherButtonTitles:nil];
[alert show];
On my end I have a main menu and I can press Play and the game will start and whatever how would I make the text that pops up after the time runs out be able to say Play Again or Main Menu?
Also how would I be able to add the same background color to the menu as in the game's interface?
Thanks in advance for the help!
-EDIT-
I did find out how to make another button, now I just need to know how to be able to link it to the Main Menu.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Time is up!"
message:[NSString stringWithFormat:@"You scored %i points",count]
delegate:self
cancelButtonTitle:@"Play Again"
otherButtonTitles:@"Main Menu", nil];
[alert show];
- RAGGED_BLADE
- n00b
- Posts: 1
- Joined: Sat Feb 02, 2013 4:07 am
- Has thanked: 0 time
- Been thanked: 0 time
Re: iOS for High School Students: Making Your First iOS App:
Great Tutorial!Thanks a lot
I am looking forward you can add another topic that how to save the highscore and show the highscore on the screen,that will help us a lot.
HowShin Wang
I am looking forward you can add another topic that how to save the highscore and show the highscore on the screen,that will help us a lot.
HowShin Wang
- howshin
- n00b
- Posts: 1
- Joined: Wed Jul 18, 2012 2:10 pm
- Has thanked: 0 time
- Been thanked: 0 time
Re: iOS for High School Students: Making Your First iOS App:
Awesome Tutorial! Great place to start when learning to code iOS Apps! So much easier then reading the mundane books! Thanks!
Re: iOS for High School Students: Making Your First iOS App:
You have done a terrific job with this tutorial. The images and the app looks absolutely superb when i completed it.
Just one thing that I noticed when running it is a particular scenario:
1. Suppose when the timer times down to 0, the background music has just a few seconds more to play
2. When we call backgroundMusic.play, since there are a few seconds of the music left, it just continues to complete playing it. So once it gets over, there is no background music till the 30 seconds are up.
So what i did is:
1. In the alertView:clickedButtonAtIndex, I stopped the background music playing using [backgroundMusic stop];
2. In setupGame, instead of [backgroundMusic play], I used backgroundMusic.currentTime = 0; [backgroundMusic play]; This causes the background music to start at the beginning each time.
Just one thing that I noticed when running it is a particular scenario:
1. Suppose when the timer times down to 0, the background music has just a few seconds more to play
2. When we call backgroundMusic.play, since there are a few seconds of the music left, it just continues to complete playing it. So once it gets over, there is no background music till the 30 seconds are up.
So what i did is:
1. In the alertView:clickedButtonAtIndex, I stopped the background music playing using [backgroundMusic stop];
2. In setupGame, instead of [backgroundMusic play], I used backgroundMusic.currentTime = 0; [backgroundMusic play]; This causes the background music to start at the beginning each time.
-

RachnaAnil - n00b
- Posts: 2
- Joined: Tue Apr 16, 2013 10:33 pm
- Location: United States
- Has thanked: 0 time
- Been thanked: 0 time
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot], iva_ozy and 9 guests