• 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
Should touch events related to a given view be implemented in the view or the view controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Should touch events related to a given view be implemented in the view or the view controller?


  • Subject: Should touch events related to a given view be implemented in the view or the view controller?
  • From: "Michael A. Crawford" <email@hidden>
  • Date: Thu, 04 Jun 2009 18:45:31 -0400

Previously, I would have said the view-controller. But I just finished looking at the Metronome sample, which is included in the iPhone SDK. The touch handling code as well as some of the view initialization code (requiring a completely loaded view) is implemented in the UIView-derived class. Is this a bad example of how things should be partitioned or do I have the wrong idea about what the view-controller is for?

Here are some related follow-up questions:

1) What should be implemented in the view-controller?

2) Should all of the view properties be completely setup and configured within the view's own init and awakeFromNib methods or is the intent of viewDidLoad to allow for configuring view properties before proceeding?

Yeah, I'm confused.  Please discuss.  I will watch and learn.

-Michael
----------------------
The difference between genius and stupidity...
...is that genius has its limits."

-- Albert Einstein



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Should touch events related to a given view be implemented in the view or the view controller?
      • From: Jonathan Hess <email@hidden>
  • Prev by Date: Re: Help with SHA class
  • Next by Date: Re: NSMutableURLRequest weirdness!
  • Previous by thread: NSToolbarItem bindings crash
  • Next by thread: Re: Should touch events related to a given view be implemented in the view or the view controller?
  • Index(es):
    • Date
    • Thread