I created a brand new view-based project and added into the viewDidLoad
- (void)viewDidLoad
{
[super viewDidLoad];
myField = [[UITextField alloc] initWithFrame:CGRectMake(50, 50, 150, 31)];
myField.delegate=self;
[self.view addSubview:myField];
[myField release];
}
my header file is
@interface textfieldpracticeViewController : UIViewController<UITextFieldDelegate>{
UITextField *myField;
}
when i click in the textfield and the keyboard pops up, i start typing but on the 2nd character, i get the exc_bad_access error. I ran it with NSZombieEnabled, NSDebugEnabled, MallocStackLoggin, and MallocStackNoCompact but they weren't able to catch the error.
This fails when using the iphone 4.3 simulator, but works fine when i build it on my iphone. is this an xcode error or am i missing something?
Thanks
P.S. even tried property/synthesize out of desparation
Try disabling autocorrection in the simulator's keyboard settings. This seems to be a bug in the autocorrection system of the simulator's iOS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With