I just opened my project with Xcode 4.1GM (was using 4.0.2 before). When I enter a number in a textfield I get an EXC Bad Access error but the log doesn't provide any info so I can't figure out whats going on. Is there something new in the 4.1 GM that messed this up?
Crash is happening in main.m file at line int retVal = UIApplicationMain(argc, argv, nil, nil);
This is a code that pushes the view and keyboard which is crashing:
- (IBAction)weightButtonPressed
{
[self.weightView setFrame:CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height)];
[self.view addSubview:self.weightView];
BOOL isKgs = [[NSUserDefaults standardUserDefaults] boolForKey:@"isKgs"];
if (isKgs)
{
self.weightLabel.text = @"0 kgs";
}
else
{
self.weightLabel.text = @"0 lbs";
}
self.weightTextField.text = nil;
UIBarButtonItem *acceptButton = [[UIBarButtonItem alloc]initWithTitle:@"Next" style:UIBarButtonItemStyleDone target:self action:@selector(dismssPickerSetWeight)];
self.navigationItem.rightBarButtonItem = acceptButton;
[acceptButton release];
[weightTextField addTarget:self action:@selector(textFieldDidChange) forControlEvents:UIControlEventEditingChanged];
self.weightSelectedString = self.weightTextField.text;
self.weightTextField.hidden = YES;
[UIView animateWithDuration:.2
animations:^
{[weightTextField becomeFirstResponder]; [self.weightView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];}
completion:^(BOOL finished){}];
}