iOS Development UI Foundation Uitextview related properties

Source: Internet
Author: User

Uitextview related properties


text: Set TextView Chinese text
_textview.text = @ "Now are the time for all good developers to come to serve their country.\n\nnow are the time for all good Developers to come to serve their country. "; Set what it displays
font: Set font for text in TextView
_textview.font = [Uifont fontwithname:@ "Arial" size:18.0]; Set font name and font size

TextColor: Set the color of the Chinese text in TextView
_textview.textcolor = [Uicolor blackcolor]; Set the font color inside the TextView

textalignment: Sets the arrangement of text for TextView
_textview.textalignment = Nstextalignmentcenter; Text arrangement in TextView, left by default

BackgroundColor: Set the background color of the TextView
_textview.backgroundcolor = [Uicolor Graycolor]; Sets the background color of light gray, which is white by default

delegate: Setting up the agent
_textview.delegate = self; Set up Proxy

Editable: Sets whether TextView can be entered
_textview.editable = NO; TextView can be entered, default is yes


Attributedtext: Set text to insert TextView by default
_textview.attributedtext = [[nsattributedstring alloc]initwithstring:@ "ATTRIBUTEDTEXT__-ABC"]; You can easily insert text into the Uitextview.

Inputview: Set the view that pops up from the bottom
_textview.inputview = [[Uidatepicker alloc]init]; Pop-up view, default to keyboard


Inputaccessoryview: Setting the secondary view above the pop-up view
_textview.inputaccessoryview = [UIButton buttonwithtype:uibuttontypedetaildisclosure]; Secondary view above the pop-up view


clearsoninsertion: Set TextView to get focus, clear previous text when user uses virtual keyboard for input
_textview.clearsoninsertion = YES; Clearsoninsertion, default to No



iOS Development UI Foundation Uitextview related properties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.