Solved

uiPickerview tap gesture no longer works in iOS 7

Posted on 2014-03-17
1
1,031 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
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.

706 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

17 Experts available now in Live!

Get 1:1 Help Now