• 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: UIAlertView won't set password field as first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: UIAlertView won't set password field as first responder
      • From: Jens Alfke <email@hidden>
References: 
 >UIAlertView won't set password field as first responder (From: Rick Mann <email@hidden>)
 >Re: UIAlertView won't set password field as first responder (From: Kyle Sluder <email@hidden>)
 >Re: UIAlertView won't set password field as first responder (From: Rick Mann <email@hidden>)
 >Re: UIAlertView won't set password field as first responder (From: Kyle Sluder <email@hidden>)
 >Re: UIAlertView won't set password field as first responder (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: UIAlertView won't set password field as first responder
  • Next by Date: Re: Converting to Window Coordinates
  • Previous by thread: Re: UIAlertView won't set password field as first responder
  • Next by thread: Re: UIAlertView won't set password field as first responder
  • Index(es):
    • Date
    • Thread