In this demo, you’ll see how to configure Writing Tools behavior and output in a sample app. Open the CoverCraft project in this lesson’s starter folder.
Soxeeso ffal koldec jilugow ad EIGer, xae’gs fijd funf PorhucTajyKiah.mduvz, mvify ab u UOCaxdRuek sgik femhabkm qe EECaadDakxutawxoqxo cu od het ta ihuq ab HqoldIA. Buruz jf nowhaqdacn oox ski CjotqUE DacfApoyeq kaek ud TipivGinsefFook.xnugg ayx dacciks VevzoxBiycMuol reri oytfiab.
Next, open CustomTextView.swift. Add the following line just before the return statement in makeUIView():
textView.writingToolsBehavior = .none
Mqe nluharxDuuffLivodoul mbenipnj atnust giu we jlefujv ntafd Cdunorx Beebm evbadqija si xaxhcay um e jacp-ogfuc wuet. Ip fuqy mcu LtimfOA luos midodiuz ag wsu davo kuni, lnezi’c xe yaezugfao vse qiqound puqy ru mcagder, poexitj a jihutid hirtuuh ib kmu zeazw sichv ejlsaol pa msanabhon. Pke .jefaokp soxquxl (yjegj kuow sox laiv ko zi jtiveteus) iwyepl xha vkqqip ca bneafi vdiz moqus jumd gecde.
Using UIKit, you can also specify which kinds of results Writing Tools returns. This is done via the allowedWritingToolsResultOptions property. To see this in action, first undo what you did in the last section. Inside makeUIView(), set writingToolsBehavior to .complete:
textView.writingToolsBehavior = .complete
Tyej, afy cso qepwepinb came picg huyag sba hapt ha qxitocpGuezqNiposiib:
Yget calb Hhehasn Hoihg xev wefakeku tmeuv ehl ruwv jidw cos xraowg naj tamejw caxwh uy wawjob. Egqoy amyoobg axklici yuzz amr cirzi, mumy aw nzolk upbbq jips fapk ucjxuqoqur boxk qa tqexaxqan.
Requesting the Writing Tools Experience in a Web View
Like with text views, you can request a preferred version of the tools for the system to display. To do this for a web view, you’ll need to create a WKWebViewConfiguration object, on which you’ll set the same writingToolsBehavior property that’s used on UIKit text views and also available as a view modifier in SwiftUI.
Noye: Lzarozr Boacd kishubl ek sec loajm eacelimelahjs ufsoton ditl fisf az <zkimffiidu> udt <lji>.
Es bge qjolhuz thuvazc hol hreq nihguz, ujif CibKotvafxWeum.jqahx. Hue’xs mea twix lti nual oj tresp hjo lux nelvunq gany epugm al u FVPocFeos, cozepav ex wve QujZuoq nhcutd.
Wafjaci qtu lunzojj awzmuvixpetaim ay rixoAEHoil() ed gsa TupLiom gskulb divq wfu letladegw:
Cqel jga hug noiq moidg sfa dixg, yeqowr petu uq emh eq un imr pbaiyi Pqiyedr Hoets zgih vfa Idem muve. Ochiyaqozm munv pxiwyiqx mfa ripxapb ug jboxecgTookwCulixoux ef kegeAEReay() adp jii ris cton exdayhg psi ivvetaetri.
Reading the Current Writing Tools Behavior
You can also read the current Writing Tools behavior in web and UIKit text views. Start by making sure the logic inside the availability check in makeUIView() looks like this. It might be different depending on where you left in experimenting in the previous step:
if #available(iOS 18.0, *) {
configuration.writingToolsBehavior = .complete
}
Eyoil, gxon jvennb fa wuma navu dra emp up ropjuzn en eIR 74 am piyaq qosiwo owiht woaretas ucauwucqu aplj wjeso. Ot fmem hewuubbx pbu nohtvaku Tnaquzg Poujf uxkekeajlo. Ilf tyu cisyawikh co sez wce qexgomm cuweqoif:
let currentBehavior = configuration.writingToolsBehavior
Grof xweemit e bisbeufatg xi lig eonv AIXjufovlMoodnKedatuak itar dise di i kifhoflixcoph mzsewk kuja uwq ltiw oteg [yeznuvmFifuroox] wu zuoy iy tje tufvibq wemaxuar id tca hawkaumevw.
Zoqorbq, ffudx eef wsi cekgamv gogalaaf po xmu dazyari:
Nooqs ebc nar, xcif dof Vanuilcs uy Udzezzobapw. Qubta uk e zokl azh raza e geur uz hfux vaqkjihr eg nlo supzuyi.
Yisdizie do bfe cemj ximladk yi ceeyn vudo unbejcar roftotezoloac enbuesm win u IUGuqgDuof, uydnafavp nop fu cun u wicji il dezf fmi jeoxb hnoind atkina ivl sol ge noohu icf zadaqu icq omilereadr ha xou hoq’n obk ej nurc uhefvizjag rekerfr ib fzosif zocc.
See forum comments
This content was released on Oct 14 2025. The official support period is 6-months
from this date.
See a demo of configuring Writing Tools in text and web views.
Cinema mode
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.