There's two equations in each tab bar. I have it to where you enter in a number in a text field and enter in the second number with the UIPicker. Everything is linked correctly in IB. And my code looks about right but whenever it gives me the answer it comes up as ... instead of a number.
Once again, a screenshot is going to go a long way in solving your problem.
Also, there are 2 possibilities:
1. Your data is wrong.
2. The display of your data is wrong.
A well-placed NSLog will help you figure out which situation you are in.
wat is NSLog and does my code help at all????
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app
How have you done anything at all without knowing what NSLog is?
Ok, your screen shots are not appearing, so you'll need to host them somewhere else probably. I'm going to make a couple of guesses, but without seeing exactly what the problem is, it's a bit tough to be certain.
So, first of all, this line appears to be what sets the text for what I assume is a label or a text field:
View the log as you run your program. If this line produces the correct answer, then the issue is with the display of your data. If it doesn't, then your data is wrong.
Next, verify for your code. For example:
Code:
tipSelected = tipSelected;
This does nothing. Did you forget a + 1 or something? No idea what this was supposed to be, but as is it doesn't do anything.
Next, you need to be aware that special characters do certain things, especially the % sign. So when you are doing %d for an integer, or %f as you are here for the float, that % means something special. Because of that, you can't just stick a % in there and have it display as text. It is special, so you have to treat it as special. In this case, you have do to a double %% in order to get the display to be what you want (assuming you want something like 2.50% to appear). So your stringWithFormat line actually needs to look like:
Now I tested it as you have it here, and I never saw "..." in the log. I just saw the number without the % sign. So if you make the code changes I've indicated here, and you've verified that your data is correct, and it still isn't displaying correctly, then I still think that your label is too small. Make it bigger.
How have you done anything at all without knowing what NSLog is?
Ok, your screen shots are not appearing, so you'll need to host them somewhere else probably. I'm going to make a couple of guesses, but without seeing exactly what the problem is, it's a bit tough to be certain.
So, first of all, this line appears to be what sets the text for what I assume is a label or a text field:
View the log as you run your program. If this line produces the correct answer, then the issue is with the display of your data. If it doesn't, then your data is wrong.
Next, verify for your code. For example:
Code:
tipSelected = tipSelected;
This does nothing. Did you forget a + 1 or something? No idea what this was supposed to be, but as is it doesn't do anything.
Next, you need to be aware that special characters do certain things, especially the % sign. So when you are doing %d for an integer, or %f as you are here for the float, that % means something special. Because of that, you can't just stick a % in there and have it display as text. It is special, so you have to treat it as special. In this case, you have do to a double %% in order to get the display to be what you want (assuming you want something like 2.50% to appear). So your stringWithFormat line actually needs to look like:
Now I tested it as you have it here, and I never saw "..." in the log. I just saw the number without the % sign. So if you make the code changes I've indicated here, and you've verified that your data is correct, and it still isn't displaying correctly, then I still think that your label is too small. Make it bigger.
OMFG, You were right!!!! I effing love you.
My label was too small!!!! Now i feel retarded
Thank you a thousand times!!!!!
__________________
My new app that was recently featured in the App Store section: Soundsations
Creator of the most awesome app iWasted
Also Created the Audience app