In this video it shows simple steps to enable to enable or activate the allowsEditingTextAttributes in the uiTextView. This concept can be used to make the text editing possible in your iOS App. It uses a button to explicitly enable this option in the uiTextView's attribute. This attribute (allowsEditingTextAttributes ) is also available in the layout editor in the form of a checkbox. However, that will enable the editing of the uiTextView only for the initial text and will not enable the editing for further texts entered while the App is running.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: [email protected]
Complete source code and other details can be found in the below link:
https://programmerworld.co/ios/how-to...
However, the main swift code is copied below also for reference:
//
// ViewController.swift
// Text Editor App
//
// Created by HomePC on 12/10/20.
// Copyright © 2020 HomePC. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var uiTextView: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func buttonEnableEditing(Sender: UIButton){
uiTextView.allowsEditingTextAttributes = true
}
}
Nesta página do site você pode assistir ao vídeo on-line How to edit UITextView (enable AllowsEditingTextAttributes) in your iOS App - bold, italics? - Xcode duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Programmer World 10 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,493 vezes e gostou 9 espectadores. Boa visualização!