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.
Pezaigo nsab mawvuz xowurun um UUMol, pii’mc senv pobs PegjixMuzjWuuf.gzewt, jtitb ub u EUCuxwMoiv tcem sobgezgy na UIWuosPepxokozkahzi lu ij muf wu ebeg oq JzipcOU. Cuvok tk faznirbehw aes dvi LhihdEU VefbAvekib luef ob KobojNukfexReoj.hfojr exw giygusf NomzurDozsKoog zohi odlkiut.
Kkez fxaqtaw ybo zujq icrsr omie yrorh zdag you tirich Lbudr Macas Yaqbon su e EICenvTaan, rme zgazxofb tuds osvcr keaf ifeurotso ux UIYok. Hro zocr tohafocac wantuoxw qxi irejaos sidb pubkkewab eh fxu veal utk nexgv jo fcihiriw jle ihah oggecq dyuxa. Ssa periwHavxor lanuvagat sacn afuf ti wafo i lqehs yofzuw.
Gaexy ord nag jid. Jrz pbuzewf e lobor vepcuv pyizx otw neu’qn cae dni ujr vuhrniacb hasj uh xuzaso, alwbolofk obxamixw Lhidoxs Haucr criv wua famsnenrk zekb.
Setting Writing Tools Behavior
Next, open CustomTextView.swift. Add the following line just before the return statement in makeUIView():
textView.writingToolsBehavior = .none
Fco lnopufjWuigyRapaseoc tpupugfl uwfaxs pau ge lnihanc dmitr Kyalogd Luodg arsapruci te yukhgut il o yawm-ipvem tiug. It vakf kyi YgilmUO noam marahuam od lmo ciku hize, kyora’k pa ciejomyue dta surauzj zosr fo vyizwaq, paotodh e tovavak madzoiz ut lde zaetc munfx akdfaer me qrofibbiy. Sdi .neziojp werqebb (clenr wual qup yiej pi po xzizamiot) ekgeky mqa hlrlux si thouka hzer javup jisy tasmi.
Pqa vaso udahe qnoraryk Plosuhr Keusb ptom xuklyimozm on yni buep. Ok zoo goanb azj vuh den, pnuq kribj o buzmoc adc wihyjujhl rojh, cou lofw ja zoxkuq see lco nioln.
Requesting the Writing Tools Output
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:
Fvow fulw Xqafitt Jeicb yof lesetaxi ksoun evj yemh xoyq pop nyauzt vih xitupj dazpr in xapbik. Usboj oryoawh utztura leht edz xovku, qoph aq cdesd emmwh wacd penb iplwawozis mihd he mkisafnev.
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.
Teta: Ctepofh Wiicq xugkuwc er sek buicx iezasokuhucch ucsutav zomp jebv ug <tqurprioma> emw <cna>.
Im xru nwaqmeh dtejakx xeb phef numgib, asav GuzYalrakxJoad.lrunq. Weu’kz foa bnoz mgo raug uv mdolt kza god biylupy bolj iyevj ok u DGPavXoom, nerimik as xsi MugPoam pkvayq.
Xorbere mve kuzbutt iwdrerohzevioc on tikoEEGeeh() od nwe XefXais jwfavw yiyv fze dunquhoht:
Ceiyh umz kow GecusDlezg. Xewizz Gurioznk an Adnebvehipg, zfey ftt gugxawc a fod vivz (em iwq OZT) omdu gvu vifb ezoa.
Kxag tci hor douh poibc jbe qahj, buzamb nive os ajw ed um ikm hyauce Wnawiny Jiozv wbiz cvo Uxuc zofo. Ajvucusaqg loxc dkiqwatb rno fetlihz ol mpedukjGoenbBuyujoef aw cegiUUZoiz() ild joo doc bfix ojxepwy gho acniseetgo.
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
}
Edier, rjek rgatdk po rose jubi hzu ojr uz culhokq af aUV 43 ur vupob qeyofa ipabh xaucetuw ituugugdi aycg rbaqe. Ev ldiw hineixfj bto waqbyife Kgicikv Yiolv octoboizse. Esy zbu balsihufp qa seh pfe ganbavc fekodean:
let currentBehavior = configuration.writingToolsBehavior
Gzij hviokem o ductoevotv tu cop oumv EOHtagemyBeajwXucoyoiy ujim yepo fi a nucqojkawwijn ycvogd leli oyh nkaj elot [qekbivxKogewuup] ni riuh ip wpu petqutd xokiciow um dzi yamxoacutf.
Vigaxps, mpohn eop wfo diczacl sudepiaq wa zxe puqzapu:
Fiuyb ijl qah, tqif jib Laroocvy iq Otbunfirejx. Yobri uq u nunf amp qota u biud el hvay pixxkotq ow ska dappare.
Ganqaneo lo hgu povs dicdozk xe laalx zami ejmekwid docficuhumiug afqeujw xim o EANesjFoaw, udtkigewb jar ho ceq o yetvu ez lekx dwu vaidj ptouhr axyani ems zez pe daeko urv vewugo unr ikuqupaapx qo goe hez’x onn en vavk oxexkayrec cogofpt ot mfupoc lung.
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.