1 line
8.6 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["visionOS"],"tokens":[{"text":"@","kind":"attribute"},{"preciseIdentifier":"s:ScM","text":"MainActor","kind":"attribute"},{"kind":"text","text":" "},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"SlothView"}],"languages":["swift"]}]},{"content":[{"type":"heading","anchor":"overview","level":2,"text":"Overview"},{"type":"paragraph","inlineContent":[{"text":"You create a sloth view by providing a ","type":"text"},{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth","isActive":true,"type":"reference"},{"type":"text","text":" binding."},{"type":"text","text":" "},{"text":"Depending on the attributes and state of the provided sloth,","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the view loads a matching image representation, such as:"}]},{"syntax":"swift","code":["@State private var sloth: Sloth","","var body: some View {"," SlothView(sloth: $sloth)","}"],"type":"codeListing"}],"kind":"content"}],"seeAlsoSections":[{"title":"Sloth Views","generated":true,"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/HabitatView","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/PowerPicker"],"anchor":"Sloth-Views"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/slothcreator\/slothview"]}],"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/s8SendableP","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/7SwiftUI4ViewP"],"kind":"relationships","type":"conformsTo"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView"},"abstract":[{"type":"text","text":"A view that displays a sloth."}],"topicSections":[{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/init(sloth:)"],"title":"Creating a Sloth View","anchor":"Creating-a-Sloth-View"},{"title":"Implementing the View","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/body"],"anchor":"Implementing-the-View"},{"anchor":"Default-Implementations","generated":true,"title":"Default Implementations","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/View-Implementations"]}],"metadata":{"modules":[{"name":"SlothCreator"}],"navigatorTitle":[{"text":"SlothView","kind":"identifier"}],"externalID":"s:12SlothCreator0A4ViewV","role":"symbol","roleHeading":"Structure","symbolKind":"struct","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"SlothView","kind":"identifier"}],"title":"SlothView"},"references":{"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/s8SendableP":{"title":"Swift.Sendable","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/s8SendableP","type":"unresolvable"},"slothCreator-icon.png":{"variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/slothCreator-icon@2x.png","traits":["2x","light"]}],"alt":"A technology icon representing the SlothCreator framework.","type":"image","identifier":"slothCreator-icon.png"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth":{"title":"Sloth","navigatorTitle":[{"text":"Sloth","kind":"identifier"}],"type":"topic","url":"\/documentation\/slothcreator\/sloth","role":"symbol","kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Sloth"}],"abstract":[{"type":"text","text":"A model representing a sloth."}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/PowerPicker":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"PowerPicker","kind":"identifier"}],"type":"topic","abstract":[{"type":"text","text":"A view to configure a sloths power."}],"navigatorTitle":[{"text":"PowerPicker","kind":"identifier"}],"kind":"symbol","role":"symbol","title":"PowerPicker","url":"\/documentation\/slothcreator\/powerpicker","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/PowerPicker"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothView/init(sloth:)":{"abstract":[{"text":"Creates a view that displays the specified sloth.","type":"text"}],"type":"topic","role":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/init(sloth:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"sloth","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI7BindingV","text":"Binding"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:12SlothCreator0A0V","kind":"typeIdentifier","text":"Sloth"},{"text":">)","kind":"text"}],"url":"\/documentation\/slothcreator\/slothview\/init(sloth:)","title":"init(sloth:)","kind":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothView/View-Implementations":{"type":"topic","kind":"article","title":"View Implementations","role":"collectionGroup","url":"\/documentation\/slothcreator\/slothview\/view-implementations","abstract":[],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/View-Implementations"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/7SwiftUI4ViewP":{"type":"unresolvable","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/7SwiftUI4ViewP","title":"SwiftUICore.View"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/HabitatView":{"url":"\/documentation\/slothcreator\/habitatview","role":"symbol","title":"HabitatView","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"HabitatView","kind":"identifier"}],"abstract":[{"text":"A view that displays a sloths habitat.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/HabitatView","navigatorTitle":[{"kind":"identifier","text":"HabitatView"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothView":{"url":"\/documentation\/slothcreator\/slothview","role":"symbol","abstract":[{"type":"text","text":"A view that displays a sloth."}],"navigatorTitle":[{"text":"SlothView","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"SlothView","kind":"identifier"}],"title":"SlothView","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator":{"url":"\/documentation\/slothcreator","type":"topic","abstract":[{"text":"Catalog sloths you find in nature and create new adorable virtual sloths.","type":"text"}],"images":[{"identifier":"slothCreator-icon.png","type":"icon"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator","title":"SlothCreator","role":"collection","kind":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothView/body":{"role":"symbol","title":"body","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothView\/body","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"body","kind":"identifier"},{"kind":"text","text":": "},{"kind":"keyword","text":"some"},{"text":" ","kind":"text"},{"text":"View","kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI4ViewP"}],"url":"\/documentation\/slothcreator\/slothview\/body","type":"topic","abstract":[]}}}