Reputation: 931
I'm a noob to iphone development(2nd day in xcode) and I am developing a beginners app that uses a UIPickerView with three components. I have using this tutorial, but some reason when I change the position of either of my components my app crashes. I have no clue what could be going on and the only thing i have to go on is "Thread: Stopped after step" at the particular line that crashes the app. Any help resolving this is greatly appreciated.
Here is my code:
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
NSInteger selectedTransaction = [pickerView selectedRowInComponent:0]; //App crashes here
NSInteger selectedCoinOrScrap = [pickerView selectedRowInComponent:1];
NSInteger selectedCurrency = [pickerView selectedRowInComponent:2];
if(selectedTransaction==2||selectedTransaction==3){
arrayWhichMetal=[[NSArray alloc]initWithArray:arrayGoldScrapType];
[pickerView reloadComponent:1];
if (selectedCoinOrScrap==0) {
}else if(selectedCoinOrScrap==1){
}
}
Upvotes: 0
Views: 436