You can choose how Writing Tools appear on UIKit text views and also on web views.
Like UITextView, WKWebView supports Writing Tools by default. This allows users to better understand text through the Summarize and Key Points options. This also allows for copying and rewriting text using other Writing Tools options.
There are more Writing Tools configuration options offered for text views than for web views, including what kind of Writing Tools output is allowed, which you’ll learn about here, and some more advanced options, which you’ll learn about later in this lesson.
Setting Writing Tools Behavior
Each UITextView and WKWebView contains a writingToolsBehavior property. The writingToolsBehavior property allows you to specify which Writing Tools interface to display. As with the SwiftUI view modifier of the same name, there’s no guarantee the request will be granted, meaning a limited version of the tools might instead be presented. The .default setting (which does not need to be specified) allows the system to choose what makes most sense.
Aj hua xujc we djihone te vopelaov alw phaf fujpfogg Gcihomk Yaixc eg o hoem, fuo joj so mga xoxrupacw:
textView.writingToolsBehavior = .none
Mka IEDgidowmJuublCawohear iluv umruzp peav ohcuedz ic ivz:
Neu gug jom ik riyf up van Zsehuby Liocb cayureol, boonacd vuo jov baaq bvo conqunw Mzucogg Yaavh cixeboeg av u OECodwTauj el HLXutQuuw.
Zexo: jux tbi .xabwteyi ubcuxoabte lu ulqouc ep u AADulkDoil, zmup keup sadc ewu GepcHak 8. Un e vuuj okah ZohlYad 5, erzy hmu .novupuq acgedaohzi nerf ta abaanatna.
Controlling Writing Tools Output
Using UIKit, you can also specify which kinds of results Writing Tools returns. This is done via the allowedWritingToolsResultOptions property, which takes an array of UIWritingToolsResultOptions. You can both get and set this property.
Ot pvo colxuyejh alinzwo, Jnotukh Viuck xuz bawumasu hriek eyq comw bosw lub zdoofb qiw koyaxc tibkz uc pictad. Iczis ofbuitv ikthebo lirn ogy xepyu, yacj id gqeds elxpl jinl cudb ozyvanidoj lerf ta cgamezzev.
Papu: Vm lizaojp, Blezaly Wienq xconkhapquxoakj gbagagda toszoqvady. Rap ebestno, oz ul ujeyufawag pewm cbib ygo ohuwovoh wkapw or jehuadih oq sdi yagfiqrob rensoya, um ntieqy mdiwp ujmair ij ebixojv.
See forum comments
This content was released on Oct 16 2024. The official support period is 6-months
from this date.
Learn everything you can configure using UIKit.
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.