Re: scrolling woes
Re: scrolling woes
- Subject: Re: scrolling woes
- From: Quincey Morris <email@hidden>
- Date: Sat, 20 May 2017 12:22:31 -0700
On May 20, 2017, at 12:01 , J.E. Schotsman <email@hidden> wrote:
>
> I am happy with the result except that I cannot set the placeholder text now.
If the text is not editable, then a text view is a better choice than a text field, but it should probably be bordered and maybe have a different background color (otherwise how do users know there’s something to scroll?). However, you don’t need placeholder text in the sense of text that tells the user what to type. Instead, you should probably do what Apple does, e.g. in Xcode when you deselect everything in the project navigator on the left, it shows “No Selection” in the inspector panel on the right.
To do that, use a second view (a text field, probably) that’s constrained to the bounds of the text field’s visible extent. Center the placeholder text horizontally and vertically, and use a large font size. Then, when setting text into the text view, hide or show exactly one of the two views, as appropriate to the text.
_______________________________________________
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