I'm a beginner at Xcode 4 and my current goal is to make a countdown timer. I figured to make something like this: put a text field that can be read by the program when the round rect button is pressed. What I got so far:
NSTimer *timer;
int MainInt;
}
-(IBAction)start:(id)sender;
-(void)countdown;
---------------------------------
The part I need to change is in the *.m part, which decides the initial MainInt value. How can I type this value in the text box and then make the program read it and set MainInt as the value read?
I love it when new people come in here and then get pissy if their question isn't answered immediately. If the problem is so simple, then solve it yourself.
And bumping after ~2 hours on a Sunday? Please.
__________________
Do not quote questionable posts.
Do not post moderator requests in public. Report the post or send a PM. <----- Use the red flag button to report posts.
Lol... this almost makes me not want to answer his problem and tell him to go hire a developer...almost...
Create a UITextField in IB and create an IBOutlet to it. Create a button that says set time. Link this button to a method that reads the value out of the UITextField by retrieving its "text" NSString property and calling intValue on it. Then set your MainInt variable. Btw, follow the naming convention, lowerCaseThenUpperCase.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.
Lol... this almost makes me not want to answer his problem and tell him to go hire a developer...almost...
Create a UITextField in IB and create an IBOutlet to it. Create a button that says set time. Link this button to a method that reads the value out of the UITextField by retrieving its "text" NSString property and calling intValue on it. Then set your MainInt variable. Btw, follow the naming convention, lowerCaseThenUpperCase.
Sorry if that was so difficult to you, thanks for the reply anyway.
Quote:
Originally Posted by Rhade
I love it when new people come in here and then get pissy if their question isn't answered immediately. If the problem is so simple, then solve it yourself.
And bumping after ~2 hours on a Sunday? Please.
Just saying, if this is a forum made specially for iPhone SDK issues and nobody posts an answer after two hours for a second-counter, the only thing you can think is that this either difficult or this forum isn't that popular. Because it's a counter, I think searching another forum with more people willing to cooperate and actually help newbies is a better option.
Lol... this almost makes me not want to answer his problem and tell him to go hire a developer...almost...
Create a UITextField in IB and create an IBOutlet to it. Create a button that says set time. Link this button to a method that reads the value out of the UITextField by retrieving its "text" NSString property and calling intValue on it. Then set your MainInt variable. Btw, follow the naming convention, lowerCaseThenUpperCase.
Ok, already created the UITextField in IB and it's outlet. I just don't get how to retrieve the text from the TextField.
Sorry if that was so difficult to you, thanks for the reply anyway.
Just saying, if this is a forum made specially for iPhone SDK issues and nobody posts an answer after two hours for a second-counter, the only thing you can think is that this either difficult or this forum isn't that popular. Because it's a counter, I think searching another forum with more people willing to cooperate and actually help newbies is a better option.
Hope you learn how to deal with people,
Marcelo
Dude, the snotty attitude is not going to get you much help. You come off as a jerk. An impatient jerk at that.
There are plenty of helpful people here, but you are unlikely to get help by snarking and sniping.
I suggest you back off with the bad attitude and try again.
By the way, this forum has a rule against bumping your threads after less than 12 hours. Rhade is a moderator here. He warned you once. If you continue to bait him, I'm sure he'd be willing to show you the door to this forum.
Quote:
Hope you learn how to deal with people
That's really rich. You come in as a newbie, asking for help, and get snotty when nobody leaps to your aid after two hours on a Sunday? Then when you get called on your rude behavior, you say you hope a forum moderator learns how to deal with people? You need to get a clue, buddy.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
If you have a UITextField myTextField, you can get the contents like this:
Code:
NSString* theText = myTextField.text;
NSString has a method intValue that lets you get the integer value of a string.
The syntax for THAT looks like this:
Code:
int theValue = [theText intValue];
Aww that's confusing >.< where should I insert the NSString* theText = myTextField.text? And the int theValue? .m or .h? I'm sooooo noob at this language, sorry :O
Just saying, if this is a forum made specially for iPhone SDK issues and nobody posts an answer after two hours for a second-counter, the only thing you can think is that this either difficult or this forum isn't that popular. Because it's a counter, I think searching another forum with more people willing to cooperate and actually help newbies is a better option.
Hope you learn how to deal with people,
Marcelo
So let me get this straight... you are brand new here. You've never done anything for anyone on this forum. You just show up and ask a question. On a Sunday. When people might be, you know, enjoying their weekend instead of wasting time on a forum, any forum. You are not offering any money; that's why you posted in the forums instead of hiring a consultant. So you think you can just demand that total strangers should help you immediately on the weekend for free.
And I'm the one who needs to learn how to deal with people? Pot. Kettle. Black.
You want to know how I deal with people like you? Well unless your attitude improves considerably, and quickly at that, you're going to find out. That's a promise.
__________________
Do not quote questionable posts.
Do not post moderator requests in public. Report the post or send a PM. <----- Use the red flag button to report posts.
So let me get this straight... you are brand new here. You've never done anything for anyone on this forum. You just show up and ask a question. On a Sunday. When people might be, you know, enjoying their weekend instead of wasting time on a forum, any forum. You are not offering any money; that's why you posted in the forums instead of hiring a consultant. So you think you can just demand that total strangers should help you immediately on the weekend for free.
And I'm the one who needs to learn how to deal with people? Pot. Kettle. Black.
You want to know how I deal with people like you? Well unless your attitude improves considerably, and quickly at that, you're going to find out. That's a promise.
You therefore lack the proper qualifications necessary in order to make an assessment regarding how challenging (or not) a particular issue is. You should keep this in mind for future requests.
__________________
Do not quote questionable posts.
Do not post moderator requests in public. Report the post or send a PM. <----- Use the red flag button to report posts.
Okay, I got it, thanks to Duncan Sorry for being hasty at first, I was upset...
One more thing: how can I make the program play sounds?
I was hoping to make an "if" statement that plays a sound when theValue gets to 0... It can be done, right?
Last edited by marcelo8576; 10-16-2011 at 04:31 PM.
Okay, I got it, thanks to Duncan Sorry for being hasty at first, I was upset...
One more thing: how can I make the program play sounds?
I was hoping to make an "if" statement that plays a sound when theValue gets to 0... It can be done, right?
Of course. Take a look at the the AVAudioPlayer class. Since you're very new at this, you might want to look at sample applications that use it.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
Just ignore him.. If hes a beginner he is bound to go NO WHERE with his attitude when it comes to help.
The way I learnt how to do exactly what you are asking is youtube. there are hundred of videos about coding, and easy coding. Before you come on a forum and ask for help, go to youtube, then google the problem to find posts that relate to your problem
and
with this problem, there are countless forum posts all over google and Im sure videos too,
and after if you cant find videos, or forum discussion on google about it, OR YOU just dont understand anything the videos or forum are showing you step by step or its not working for you..
THEN you come on a forum and post a question. Good luck once again trust me there is countless examples of this on the web.
Just ignore him.. If hes a beginner he is bound to go NO WHERE with his attitude when it comes to help.
The way I learnt how to do exactly what you are asking is youtube. there are hundred of videos about coding, and easy coding. Before you come on a forum and ask for help, go to youtube, then google the problem to find posts that relate to your problem
and
with this problem, there are countless forum posts all over google and Im sure videos too,
and after if you cant find videos, or forum discussion on google about it, OR YOU just dont understand anything the videos or forum are showing you step by step or its not working for you..
THEN you come on a forum and post a question. Good luck once again trust me there is countless examples of this on the web.
Yeah, I was just looking for tutorials on YouTube but the code was old or something, I think it was Xcode 3 at the time... I just got my brand-new MacBook Air, the last one of the S.J. generation and since I'm not using my PC so often, I figured I stop dealing with C++ and get to know Xcode...
Xcode versions don't matter, the code will still be the same. Only time code changes is when Apple decides to toss out some methods and replace them with new ones. Even then, the old methods will still work, it's just not advised to use them.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.
Xcode versions don't matter, the code will still be the same. Only time code changes is when Apple decides to toss out some methods and replace them with new ones. Even then, the old methods will still work, it's just not advised to use them.
While on the topic domele, I,m building my app game in xcode 4.0.2, will that code be complatible with ios 5? I want to make it as wide spread IOS compatible as I can and IOS is a must now including IOS 4 and MAYBE IOS3. is xcode 4.0.2 good for that? I just have a simple 2 d game you move stuff and they do things.
Lol as simple as it sounds I got 23,000 lines of code.. thats just in my .m controller view. It turned from a simple idea to quite the complex thing. it will be out soon tho 7 months of work!
I can't accurately judge since I don't know what your controller does but if you have 23,000 lines of code in it, you might be bundling too many things in one class.
Also, you can compile for iOS 3-iOS5 on Xcode 4. Just make sure to not use any methods that appeared after iOS 3. If you do need to use a method that is not compatible with an iOS version you are building for, either make sure it's an optional feature and check whether the method is available in the user's iOS version or have a backup solution.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.