1 line
9.8 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.

{"sections":[],"metadata":{"modules":[{"name":"SlothCreator"}],"images":[{"identifier":"slothy-card.png","type":"card"}],"title":"Slothy: Integrating SlothCreator into an App","roleHeading":"Sample Code","role":"sampleCode"},"seeAlsoSections":[{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/GettingStarted","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth"],"anchor":"Essentials","title":"Essentials","generated":true}],"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","anchor":"Overview","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"This sample creates ","type":"text"},{"inlineContent":[{"type":"text","text":"Slothy"}],"type":"emphasis"},{"type":"text","text":", an app for creating"},{"type":"text","text":" "},{"type":"text","text":"and caring for custom sloths."}]},{"identifier":"slothy-hero","type":"video"},{"columns":[{"content":[{"inlineContent":[{"text":"First, you customize your sloth by picking its","type":"text"},{"type":"text","text":" "},{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","isActive":true,"type":"reference"},{"type":"text","text":"."},{"text":" ","type":"text"},{"type":"text","text":"The power of your sloth influences its abilities and how well"},{"text":" ","type":"text"},{"type":"text","text":"they cope in their environment. The app displays a picker view"},{"type":"text","text":" "},{"text":"that showcases the available powers and previews your sloth","type":"text"},{"type":"text","text":" "},{"text":"for the selected power.","type":"text"}],"type":"paragraph"}],"size":2},{"content":[{"inlineContent":[{"identifier":"slothy-powerPicker","type":"image"}],"type":"paragraph"}],"size":1}],"numberOfColumns":3,"type":"row"},{"type":"row","numberOfColumns":3,"columns":[{"size":1,"content":[{"type":"paragraph","inlineContent":[{"type":"image","identifier":"slothy-status"}]}]},{"size":2,"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Once youve customized your sloth, its ready to"},{"type":"text","text":" "},{"type":"text","text":"ready to thrive. Youll find that sloths will"},{"type":"text","text":" "},{"type":"text","text":"happily munch on a leaf, but may not be as"},{"text":" ","type":"text"},{"text":"receptive to working out. Use the activity picker","type":"text"},{"type":"text","text":" "},{"text":"to send some encouragement.","type":"text"}]}]}]},{"level":3,"text":"Localization","anchor":"Localization","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Slothy also showcases SlothCreators localized content."},{"type":"text","text":" "},{"text":"The name of powers and food are presented in the devices","type":"text"},{"type":"text","text":" "},{"text":"current locale. Take a look at a few examples.","type":"text"}]},{"tabs":[{"content":[{"type":"paragraph","inlineContent":[{"identifier":"slothy-localization_eng","type":"image"}]}],"title":"English"},{"content":[{"type":"paragraph","inlineContent":[{"identifier":"slothy-localization_zh","type":"image"}]}],"title":"Chinese"},{"content":[{"inlineContent":[{"identifier":"slothy-localization_es","type":"image"}],"type":"paragraph"}],"title":"Spanish"}],"type":"tabNavigator"}]}],"sampleCodeDownload":{"kind":"sampleDownload","action":{"type":"reference","identifier":"https:\/\/example.com\/slothy-repository","overridingTitle":"View Source","isActive":true}},"variants":[{"paths":["\/documentation\/slothcreator\/slothysample"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator"]]},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothySample"},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"Integrate SlothCreator into an iOS app for creating and caring","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"for custom sloths."}],"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/documentation/SlothCreator/Sloth/power-swift.property":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"power"},{"text":": ","kind":"text"},{"text":"Power","preciseIdentifier":"s:12SlothCreator0A0V5PowerO","kind":"typeIdentifier"}],"title":"power","kind":"symbol","abstract":[{"type":"text","text":"The power of the sloth."}],"url":"\/documentation\/slothcreator\/sloth\/power-swift.property","type":"topic"},"slothy-powerPicker":{"type":"image","alt":"A screenshot of the power picker user interface with four powers displayed ice, fire, wind, and lightning","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-powerPicker@2x.png","traits":["2x","light"]}],"identifier":"slothy-powerPicker"},"slothCreator-icon.png":{"type":"image","alt":"A technology icon representing the SlothCreator framework.","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothCreator-icon@2x.png","traits":["2x","light"]}],"identifier":"slothCreator-icon.png"},"slothy-card.png":{"type":"image","alt":null,"variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-card@2x.png"}],"identifier":"slothy-card.png"},"doc://slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator/documentation/SlothCreator/GettingStarted":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/GettingStarted","role":"article","images":[{"type":"card","identifier":"gettingStarted-card.png"}],"title":"Getting Started with Sloths","kind":"article","abstract":[{"type":"text","text":"Create a sloth and assign personality traits and abilities."}],"url":"\/documentation\/slothcreator\/gettingstarted","type":"topic"},"slothy-status":{"type":"image","alt":"A screenshot of the sloth status user interface that indicates the the amount of sleep, fun, and exercise a given sloth is in need of.","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-status@2x.png","traits":["2x","light"]}],"identifier":"slothy-status"},"gettingStarted-card.png":{"type":"image","alt":"The profile images for a regular sloth and an ice sloth.","variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/gettingStarted-card@2x.png"}],"identifier":"gettingStarted-card.png"},"https://example.com/slothy-repository":{"checksum":null,"url":"https:\/\/example.com\/slothy-repository","type":"download","identifier":"https:\/\/example.com\/slothy-repository"},"slothy-localization_eng":{"type":"image","alt":"Two screenshots showing the Slothy app rendering with English language content. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-localization_eng@2x.png","traits":["2x","light"]}],"identifier":"slothy-localization_eng"},"slothy-localization_zh":{"type":"image","alt":"Two screenshots showing the Slothy app rendering with Chinese language content. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-localization_zh@2x.png"}],"identifier":"slothy-localization_zh"},"slothy-hero-poster":{"type":"image","alt":null,"variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-hero-poster.png","traits":["1x","light"]}],"identifier":"slothy-hero-poster"},"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"},"slothy-localization_es":{"type":"image","alt":"Two screenshots showing the Slothy app rendering with Spanish language content. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-localization_es@2x.png"}],"identifier":"slothy-localization_es"},"slothy-hero":{"type":"video","alt":"An animated video showing two screens in the Slothy app. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","variants":[{"traits":["1x","light"],"url":"\/videos\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/slothy-hero.mp4"}],"poster":"slothy-hero-poster","identifier":"slothy-hero"}}}