Transcript on iOS
Videos should contain a transcript to allow users to read what is shown in media, such as a video or podcast.
A basic transcript contains information needed to understand what is being said. This mostly benefits people who are deaf or hard of hearing, or have difficulty processing auditory information.
A descriptive transcript also contains visual information to understand what is being shown. This mostly benefits people who are blind or visually impaired.
On iOS, you can use UITextView
to present a transcript. A UITextView
is scrollable by default. You can also choose to place one or more UILabel
's in a UIScrollView
.
// Option 1
let transcript = UITextView()
transcript.text = "Appt transcript"
// Option 2
let transcript = UILabel()
transcript.text = "Appt transcript"
let view = UIView()
view.addSubview(transcript)
let scrollView = UIScrollView()
scrollView.addSubview(view)