我在調試時遇到了問題。我有一個UITextView在碰觸時會崩潰。只有其中一些崩潰,如:帳戶類型和增值稅季度結束。 這是屏幕的外觀崩潰時,如:觸摸時UITextField崩潰
這是代碼:
@synthesize txtAccType = _txtAccountType;
- (void)viewDidLoad {
[super viewDidLoad];
arrAccountType = [[NSMutableArray alloc] initWithObjects:@"Freelancers", nil];
//self.title = @"Account Setting";
self.title = NSLocalizedString(@"AccountSetting", nil);
self.navigationItem.rightBarButtonItem = self.doneBarButtonItem;
arrCatId = [[NSMutableArray alloc] init];
arrCategory = [[NSMutableArray alloc] init];
arrTotal = [[NSMutableArray alloc] init];
tag = 0;
[svAccountSetting setContentSize:CGSizeMake(280, 600)];
arrCsvData = [[NSMutableArray alloc] init];
quarterEndDatesArray = [[NSArray alloc] initWithObjects:
@"April/Jul/Oct/Jan",
@"May/Aug/Nov/Feb",
@"June/Sep/Dec/Mar", nil];
[self setAcc];
}
-(IBAction)selectAccountType
{
[self.txtAccType resignFirstResponder];
[svAccountSetting setContentOffset:CGPointMake(0, 6) animated:YES];
[ActionSheetPicker displayActionPickerWithView:self.view data:arrAccountType selectedIndex:self.selectedIndex target:self action:@selector(itemWasSelected:) title: NSLocalizedString(@"Select_Account_Type", nil) ];
}
- (void)itemWasSelected:(NSNumber *)selectedIndexs {
//Selection was made
self.selectedIndex = [selectedIndexs intValue];
self.txtAccType.text = [arrAccountType objectAtIndex:self.selectedIndex];
}
由於這個項目是年紀大了,我在想,如果一些經驗豐富的iOS開發者也許能夠幫幫我。
你在調試器中得到什麼消息,當它崩潰? –
崩潰的消息? – Aladin
根本沒有消息。這是另一件困難的事情。 – Paul