Re: Subclassing UIWebview a show-stopper?

2011-08-09 Thread David Duncan
On Aug 8, 2011, at 10:51 PM, arri wrote:

> After allot of writing test-cases, and googling for others' experiences, i 
> found that the most easy and straightforward way of achieving what i want, is 
> to simply subcass UIWebView and override UIViews' - hitTest:withEvent method. 
> However, as everyone emphasize everywhere i look, the docs say i "should" not 
> subclass UIWebView.

There are a /lot/ of gotchas with UIWebView, so much so that even things that 
you might consider as an innocent override can have impact that you would not 
expect. If there were two ways to do something, and one involved subclassing 
UIWebView and the other did not, I would nearly always choose the method that 
didn't involved subclassing.

So the question to you becomes what problem are you trying to solve that you 
believe you need to override -hitTest:withEvent:?
--
David Duncan

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Subclassing UIWebview a show-stopper?

2011-08-08 Thread Dave DeLong
Hi Arri,

Subclassing UIWebView is probably not going to get your app rejected (though I 
have no insight in to the approval process).  However from a architecture 
point-of-view, it "smells" bad.  UIWebView is one of those views that's not 
intended to be subclassed.  Sure you can, since you can declare anything as 
your superclass, but I'd be highly surprised if the UIWebView authors are even 
expecting people to subclass it.  If they're not, then that could mean that 
there's logic in there that operates on the assumption of none of the methods 
being overridden.  There are certainly classes like that in all of the Cocoa 
(Touch) frameworks.

This sounds like one of the things that I'd only go ahead with after I've 
proven that every other idea presented isn't possible.

Dave

On Aug 8, 2011, at 10:51 PM, arri wrote:

> Hello,
> 
> After allot of writing test-cases, and googling for others'
> experiences, i found that the most easy and straightforward way of
> achieving what i want, is to simply subcass UIWebView and override
> UIViews' - hitTest:withEvent method.
> However, as everyone emphasize everywhere i look, the docs say i
> "should" not subclass UIWebView.
> 
> Perhaps this is more about the english language than about software
> development or Apple, but what does "should" exactlty mean in this
> context.
> Will Apple possibly reject the app if i use a UIWebView subclass?
> 
> Or does it mean how i've always understood the word "should" and i
> could read the docs as such: "…there shouldn't be a need to
> subclass…".
> In other words: subclassing UIWebview will not result in a rejection.
> 
> 
> 
> 
> 
> 
> thanks,
> arri
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
> 
> This email sent to davedel...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Subclassing UIWebview a show-stopper?

2011-08-08 Thread arri
Hello,

After allot of writing test-cases, and googling for others'
experiences, i found that the most easy and straightforward way of
achieving what i want, is to simply subcass UIWebView and override
UIViews' - hitTest:withEvent method.
However, as everyone emphasize everywhere i look, the docs say i
"should" not subclass UIWebView.

Perhaps this is more about the english language than about software
development or Apple, but what does "should" exactlty mean in this
context.
Will Apple possibly reject the app if i use a UIWebView subclass?

Or does it mean how i've always understood the word "should" and i
could read the docs as such: "…there shouldn't be a need to
subclass…".
In other words: subclassing UIWebview will not result in a rejection.






thanks,
arri
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com