I am facing this issue on device that assigning the selected row value of picker takes too much time to be shown on label while on simulator it works fine.
Below is the code:
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row
inComponent:(NSInteger)component
{
if (pickerView == rewardsName) {
NSString *selectedReward = [self.rewards objectAtIndex:row];
if ([reward1.text length]==0){
//set label 1
reward1.text = selectedReward;
}
if ([reward2.text length]==0){
//set label 2
reward2.text = selectedReward;
}
if([reward3.text length]==0){
//set label 3.
reward3.text = selectedReward;
}
}
else if(pickerView == selectNamazPicker){
aNumberString = [self.namazArray objectAtIndex:row];
NSLog(@"aNumberString:: %@", aNumberString);
}
}
Can anyone tell me what can be the issue … I am unable to find one…
**
EDITED:
ISSUE RESOLVED:
**
For others who would face this issue.
I don't know whether it was creating the problem or not. But I did make these changes to my code.
In my .h file, previously I was just defining properties of UILabels (reward1, reward2 etc) with IBOutlet and not ivars. But then I defined ivars as IBOutlet UILabel reward1; etc and eliminated IBOutlet from properties then it started working fine.
Now the problem has resolved.
For others who would face this issue.
I don’t know whether it was creating the problem or not. But I did make these changes to my code.
In my .h file, previously I was just defining properties of UILabels (reward1, reward2 etc) with IBOutlet and not ivars. But then I defined ivars as IBOutlet UILabel reward1; etc and eliminated IBOutlet from properties then it started working fine.
Now the problem has resolved.