Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interface practiceViewController : UIViewController <UITextFieldDelegate>
- {
- UITextField *userInput;
- }
- @property (nonatomic, retain, readwrite) UITextField *userInput;
- @end
- -(UITextField *)userInput{
- if (userInput == nil) {
- userInput=[[UITextField alloc]init];
- userInput.keyboardType= UIKeyboardTypeNumberPad;
- userInput.returnKeyType= UIReturnKeyDone;
- userInput.textColor=[ UIColor redColor];
- userInput.clearButtonMode= UITextFieldViewModeWhileEditing;
- userInput.delegate = self;
- }
- return userInput;
- int nInput=[[userInput text] intValue];
- int nInput = [[userInput text] intValue];
- [self.view addSubview:self.userInput];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement