# How to change the font and color on the UITextView in iOS?

iOSApps/ApplicationsMobile Development

Changing font and color on UITextView is simple, you just need to update the .textColor and .font property on UITextView object, Here we will be seeing how to do so.

So let’s get started,

Open Main.storyboard and add UITextView as shown below,

Create @IBOutlet of UITextView and name it, textView.
@IBOutlet var textView: UITextView!

textView.textColor = UIColor.cyan
textView.font = UIFont(name: "Callout", size: 20)

Final Code should look like,

import UIKit
class ViewController: UIViewController {
@IBOutlet var textView: UITextView!
textView.font = UIFont(name: "Callout", size: 20)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.39273786544799805, "perplexity": 29953.349757048858}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882572192.79/warc/CC-MAIN-20220815145459-20220815175459-00130.warc.gz"}