Re: UIAlertView won't set password field as first responder
Re: UIAlertView won't set password field as first responder
- Subject: Re: UIAlertView won't set password field as first responder
- From: Kyle Sluder <email@hidden>
- Date: Wed, 22 Apr 2015 15:34:21 -0500
On Wed, Apr 22, 2015, at 03:21 PM, Rick Mann wrote:
> I don't think this qualifies as "messing with the internals."
Accessing the subviews of a view you do not own is by definition
"messing with the internals".
> Apple
> provides those methods.
Just because a method exists doesn't mean that it is OK for arbitrary
clients to access it.
It's an unfortunate reality of our current crop of OOP languages that
composability leads to unsafely exposing details such as this. There's
no clean way to say "certain callsites are allowed to do mutation-like
things through to this collection and its contents, but other callsites
can only read certain properties of things contained inside, and still
others shouldn't even access this collection".
>
> Provide me with a solution, or tell me it's impossible for some reason
> that explains why others have reported success.
Your solution is to use UIAlertController on platforms where it exists.
It already has the correct first responder you desire.
--Kyle Sluder
_______________________________________________
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