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