• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIBarButtonItem exclusive touch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIBarButtonItem exclusive touch


  • Subject: UIBarButtonItem exclusive touch
  • From: Leon Qiao <email@hidden>
  • Date: Tue, 30 Aug 2011 10:34:23 +0800

Dear all,

The UI I made is like the system app "Contact", there's an "add" bar button
on the navigation bar. And a table view where you can tap and enter the
detail view. The problem is when the user tap the bar button item and the
table view cell at the same time, it doesn't work well.

The code here:

Action for right bar button item:
- (IBAction)saveAction: (id)sender;
{
     ...
     ...
      [NSThread detachNewThreadSelector:@selector(saveTheData) toTarget:self
withObject:nil];
}

- (void)saveTheData
{
     //some save action...
     [self.navigationController popToRootViewControllerAnimated: YES];
//when complete, pop to the root
}

Action for table view's delegate method

- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     DetailViewController *controller = [[DetailViewController alloc]init];
     [self.navigationController pushViewController: controller animated:
YES];
     [controller release];
}

When using UIButton, we can set the exclusive touch property to avoid
tapping the two buttons at the same time. But what should I do for the table
view and the bar button item.

Thanks a lot!

Best regards
Leon
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UIBarButtonItem exclusive touch
      • From: Conrad Shultz <email@hidden>
  • Prev by Date: Re: Large over 100K pixel high ruler scroll view
  • Next by Date: Re: Large over 100K pixel high ruler scroll view
  • Previous by thread: Re: NSWindowController
  • Next by thread: Re: UIBarButtonItem exclusive touch
  • Index(es):
    • Date
    • Thread