• 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
Re: [iPhone] Preprocessing events sent to UITableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] Preprocessing events sent to UITableView


  • Subject: Re: [iPhone] Preprocessing events sent to UITableView
  • From: WT <email@hidden>
  • Date: Tue, 8 Jun 2010 18:42:25 +0200

Fair enough.

The app I'm writing is a newspaper-like app, similar to The New York Times app. The client for whom I'm writing this app wants the reader to be able to swipe horizontally to switch sections (say, from "latest news" to "sports" to "entertainment", etc). Each section has its own view controller, all of which manage a shared view. That view is part of a larger view which contains, among other things, a scrollable list of section "buttons." That larger view, of course, has its own view controller.

The reader can tap on a section button and the contents of that section get dumped into the tableview but the client also wants the user to be able to swipe horizontally to switch sections. Naturally, the view controller for a section is not the appropriate place to manage the swipe since it involves knowledge about other sections. So, I need to intercept the touch events received by the table view, pass them a couple of levels up to the view controller of the larger view, do the analysis to figure out whether to swipe or allow the table to scroll, then pass the events back down to the table if the user intended to scroll vertically.

The solution I indicated works fine, but I don't think it's very elegant. Personally, I think swiping to change sections is a bad idea, but that's not my call to make.

On Jun 6, 2010, at 4:30 PM, David Duncan wrote:

> On Jun 6, 2010, at 1:41 AM, WT wrote:
>
>> Yes, I'm aware of that recommendation. I think that's precisely the core of my question, namely, how to do what I need to do in the safest possible way.
>
>
> I think you need to tell us what the goal you are trying to achieve is, rather than asking how to do it the way you think you should. Then perhaps someone can recommend a better solution.
> --
> David Duncan
> Apple DTS Animation and Printing

On Jun 6, 2010, at 4:37 PM, Matt Neuburg wrote:

> On Sun, 6 Jun 2010 10:41:41 +0200, WT <email@hidden> said:
>
>> question, namely, how to do what I need to do in the safest possible way. I
> found a solution, but I don't think it's very elegant
>
> Sorry if I'm being dense, but did we establish what you *do* need to do? I
> didn't grasp why you're jumping through all these hoops in the first place.
> Just curious... Thx. m.
_______________________________________________

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: [iPhone] Preprocessing events sent to UITableView
      • From: Matt Neuburg <email@hidden>
References: 
 >[iPhone] Preprocessing events sent to UITableView (From: WT <email@hidden>)
 >Re: [iPhone] Preprocessing events sent to UITableView (From: glenn andreas <email@hidden>)
 >Re: [iPhone] Preprocessing events sent to UITableView (From: WT <email@hidden>)
 >Re: [iPhone] Preprocessing events sent to UITableView (From: David Duncan <email@hidden>)

  • Prev by Date: Re: 32bit float array to PNG thanks to NSBitmapImageRep problem
  • Next by Date: Re: [iPhone] Preprocessing events sent to UITableView
  • Previous by thread: Re: [iPhone] Preprocessing events sent to UITableView
  • Next by thread: Re: [iPhone] Preprocessing events sent to UITableView
  • Index(es):
    • Date
    • Thread