Я только что открыл свой проект с помощью Xcode 4.1GM (ранее использовал 4.0.2).Когда я ввожу число в текстовое поле, я получаю сообщение об ошибке EXC Bad Access, но журнал не предоставляет никакой информации, поэтому я не могу понять, что происходит.Есть ли что-то новое в 4.1 GM, которое испортило это?
Сбой происходит в файле main.m в строке int retVal = UIApplicationMain(argc, argv, nil, nil);
Это код, который выдвигает вид и клавиатуру, котораясбой:
- (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){}];
}