Solved

uiPickerview tap gesture no longer works in iOS 7

Posted on 2014-03-17
1
1,042 Views
Last Modified: 2014-04-09
Here is my code:

-(IBAction)txtInd:(id)sender{
    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(indirectTap:)];
   
   
    [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.showsSelectionIndicator=YES;
    picker.userInteractionEnabled=YES;
   
   [self.view addSubview:picker];
    pvProjects = picker;
    [pvProjects release];
   
}

Never makes it here:
-(void)indirectTap:(id)sender{

    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?
0
Comment
Question by:thenrich
1 Comment
 
LVL 19

Accepted Solution

by:
darbid73 earned 500 total points
ID: 39977351
have you stepped through your code to see where it errors?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
A brief look into what is, how to use, and how to make GIFs
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now