Re: Subclass UIScrollView
Re: Subclass UIScrollView
- Subject: Re: Subclass UIScrollView
- From: Fritz Anderson <email@hidden>
- Date: Tue, 29 Jun 2010 14:39:22 -0500
On 29 Jun 2010, at 2:14 PM, Joshua Tucker wrote:
> could someone please explain how I can subclass a UIScrollView, so I can do things like drawRect: etc.
1. To simple-mindedly answer your question, you just declare your class, in its main @interface, to be a subclass of UIScrollView. Then implement your methods.
2. What user-visible behavior are you trying to produce? Maybe there's a way to do it that doesn't involve hacking a scroll view. Subclassing system facilities is fairly rare in Cocoa (unless it's invited, as with UIView), and if you're tempted, it's time to double-check to see if there isn't another way to do it.
What do you want to see on the screen?
— F
_______________________________________________
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