我在调试时遇到了问题。我有一个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