thenrich
asked on
uiPickerview tap gesture no longer works in iOS 7
Here is my code:
-(IBAction)txtInd:(id)send er{
inProjectField=NO;
inIndField=YES;
inTaskField=NO;
pvProjects.hidden=YES;
curInd = @"";
txtInd.text=@"";
[TaskArray removeAllObjects];
txtTask.enabled=NO;
UIPickerView *picker = [[UIPickerView alloc]
initWithFrame:CGRectMake(- 45, 290, 410, 270)];
picker.delegate = self;
myGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(indirectT ap:)];
[myGR setNumberOfTapsRequired:1] ;
[myGR setNumberOfTouchesRequired :1];
[picker addGestureRecognizer:myGR] ;
picker.backgroundColor = [UIColor lightGrayColor];
picker.transform= CGAffineTransformMakeScale (.7f, .7f);
[picker selectRow:0 inComponent:0 animated:YES];
picker.showsSelectionIndic ator=YES;
picker.userInteractionEnab led=YES;
[self.view addSubview:picker];
pvProjects = picker;
[pvProjects release];
}
Never makes it here:
-(void)indirectTap:(id)sen der{
pvProjects.hidden=YES;
lblBidHrs.text=@"";
lblActualHrs.text=@"";
[TaskArray removeAllObjects];
txtTask.backgroundColor= [UIColor whiteColor];
if ([curInd isEqualToString:@"-none-"] ){
txtInd.text = @"";}
else{
txtInd.text = curInd;
txtProject.text = @"";
txtTask.text = @"";
}
[self playTone];
[self.view endEditing:YES];
}
Worked fine up until the 7.1 update?
-(IBAction)txtInd:(id)send
inProjectField=NO;
inIndField=YES;
inTaskField=NO;
pvProjects.hidden=YES;
curInd = @"";
txtInd.text=@"";
[TaskArray removeAllObjects];
txtTask.enabled=NO;
UIPickerView *picker = [[UIPickerView alloc]
initWithFrame:CGRectMake(-
picker.delegate = self;
myGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(indirectT
[myGR setNumberOfTapsRequired:1]
[myGR setNumberOfTouchesRequired
[picker addGestureRecognizer:myGR]
picker.backgroundColor = [UIColor lightGrayColor];
picker.transform= CGAffineTransformMakeScale
[picker selectRow:0 inComponent:0 animated:YES];
picker.showsSelectionIndic
picker.userInteractionEnab
[self.view addSubview:picker];
pvProjects = picker;
[pvProjects release];
}
Never makes it here:
-(void)indirectTap:(id)sen
pvProjects.hidden=YES;
lblBidHrs.text=@"";
lblActualHrs.text=@"";
[TaskArray removeAllObjects];
txtTask.backgroundColor= [UIColor whiteColor];
if ([curInd isEqualToString:@"-none-"]
txtInd.text = @"";}
else{
txtInd.text = curInd;
txtProject.text = @"";
txtTask.text = @"";
}
[self playTone];
[self.view endEditing:YES];
}
Worked fine up until the 7.1 update?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.