Yeah, thanks to Graham for suggesting using viewDidLoad(). That fixed it. What's annoying and disturbing is this: It worked before the storyboard was touched by Xcode 8. No changes, just whatever IB does when you open a file in it.
Same behavior on 8.4, 9.3, and 10.0. > On Oct 11, 2016, at 20:37 , Carl Hoefs <[email protected]> wrote: > > Rick, > > I think I may have encountered similar issues. -viewWillAppear: occurs very > early in the view instantiation process, too early for certain things to > execute successfully, and so it's likely that becomeFirstResponder() may not > work properly or reliably from -viewWillAppear:. I solved my issues by using > -viewDidAppear: or -viewDidLoad, both of which also execute on the main > thread, but later in the view instantiation process. > > -Carl > >> On Oct 11, 2016, at 6:29 PM, Rick Mann <[email protected]> wrote: >> >> Ah, it happens because we call becomeFirstResponder() on the first text >> field while in viewWillAppear(). Dispatching that on the main queue >> asynchronously fixes the problem, but ugh it's so hacky. > -- Rick Mann [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
