Hey guys, I am new to all this and I am sorry for such a noobie question, but no matter where I go I just can't find it. So I am trying to make an iphone app and I want to get an integer value from the user through a text field, so i could then do some math with the number and display is back on the app.
I got the text field working fine but I need to know how to get the value of what is in the text field as an integer, not a string, so when a button is pressed it does some math. Which file is that done in the header or the implementation file?
here is my Header file (if needed):
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface MainView : UIView {
IBOutlet UITextField *textInput;
IBOutlet UILabel *textOut;
int x;
}
- (IBAction)pressMe;
I got the text field working fine but I need to know how to get the value of what is in the text field as an integer, not a string, so when a button is pressed it does some math. Which file is that done in the header or the implementation file?
here is my Header file (if needed):
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface MainView : UIView {
IBOutlet UITextField *textInput;
IBOutlet UILabel *textOut;
int x;
}
- (IBAction)pressMe;