5
kenrick
9y

Why doesn't UITextView have a placeholder?

Comments
  • 0
    Because, Apple.
  • 1
    Or why hasn't UITextField got data detectors?
  • 0
    You can't expect an API to have every single iteration of functionality. It's easy to do - subclass UITableViewCell and add a text field subview
  • 0
    @xroad Not sure I'm following. What's a UITableViewCell got to do with this?
  • 0
    @bellapplab - never mind, it's too early in the morning. I thought he meant he wanted placeholders inside the table views cells.

    Either way, still not hard to do. Just add a subview placeholder.

    What's a data detector?
  • 0
    @xroad it's the ability to recognise emails, phone numbers etc.
  • 0
    Why would you need that?
  • 1
    @xroad So you can drop a body of text onto a view an it recognises emails, URLs, phone numbers and addresses (taking localisation into consideration), highlights them and makes them actionable, relaying the user to the proper app (phones numbers go to the phone app, URLs to the browser and so on).
  • 0
    @xroad I think if you can recognize the context you could automatically link functions or formatting - i.e. email opens an email draft, phone number formats it (123) 456-7890 and lets you call or add as contact, etc.
  • 0
    You wouldn't need any of those in a UITableView though
  • 2
    @xroad mate... what?

    Go grab a coffee. He said UITextField.
  • 1
    @vince UITextView, but yeah. Nothing to do with tables.
  • 1
    @BellAppLab I was referring to your comment. I originally put UITextView but then I realized you actually wrote UITextField.
  • 1
    Coffee consumed. Lol
Add Comment