@maccesar/titools 2.2.4 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/lib/commands/update.js +4 -12
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +31 -31
- package/skills/alloy-guides/references/CONCEPTS.md +3 -3
- package/skills/alloy-guides/references/CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/MODELS.md +6 -6
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/VIEWS_XML.md +1 -1
- package/skills/alloy-guides/references/WIDGETS.md +1 -1
- package/skills/alloy-howtos/SKILL.md +27 -27
- package/skills/alloy-howtos/references/best_practices.md +9 -9
- package/skills/alloy-howtos/references/cli_reference.md +14 -14
- package/skills/alloy-howtos/references/config_files.md +16 -16
- package/skills/alloy-howtos/references/custom_tags.md +16 -16
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +11 -15
- package/skills/alloy-howtos/references/samples.md +19 -19
- package/skills/purgetss/SKILL.md +11 -1
- package/skills/purgetss/references/animation-system.md +1 -1
- package/skills/purgetss/references/cli-commands.md +3 -3
- package/skills/purgetss/references/customization-deep-dive.md +1 -1
- package/skills/purgetss/references/dynamic-component-creation.md +1 -1
- package/skills/purgetss/references/icon-fonts.md +4 -0
- package/skills/purgetss/references/installation-setup.md +8 -1
- package/skills/purgetss/references/migration-guide.md +4 -0
- package/skills/purgetss/references/tikit-components.md +193 -204
- package/skills/purgetss/references/ui-ux-design.md +1 -1
- package/skills/ti-expert/SKILL.md +78 -118
- package/skills/ti-expert/references/alloy-builtins.md +18 -18
- package/skills/ti-expert/references/alloy-structure.md +21 -21
- package/skills/ti-expert/references/anti-patterns.md +15 -15
- package/skills/ti-expert/references/cli-expert.md +15 -15
- package/skills/ti-expert/references/code-conventions.md +38 -38
- package/skills/ti-expert/references/contracts.md +8 -8
- package/skills/ti-expert/references/controller-patterns.md +14 -14
- package/skills/ti-expert/references/error-handling.md +11 -11
- package/skills/ti-expert/references/examples.md +12 -12
- package/skills/ti-expert/references/migration-patterns.md +24 -24
- package/skills/ti-expert/references/patterns.md +10 -10
- package/skills/ti-expert/references/performance-listview.md +16 -16
- package/skills/ti-expert/references/performance-optimization.md +41 -41
- package/skills/ti-expert/references/security-device.md +22 -22
- package/skills/ti-expert/references/security-fundamentals.md +19 -19
- package/skills/ti-expert/references/state-management.md +33 -33
- package/skills/ti-expert/references/testing-e2e-ci.md +25 -25
- package/skills/ti-expert/references/testing-unit.md +24 -24
- package/skills/ti-expert/references/theming.md +15 -15
- package/skills/ti-guides/SKILL.md +58 -60
- package/skills/ti-guides/references/advanced-data-and-images.md +33 -33
- package/skills/ti-guides/references/android-manifest.md +15 -15
- package/skills/ti-guides/references/app-distribution.md +70 -166
- package/skills/ti-guides/references/application-frameworks.md +96 -114
- package/skills/ti-guides/references/cli-reference.md +294 -294
- package/skills/ti-guides/references/coding-best-practices.md +42 -33
- package/skills/ti-guides/references/commonjs-advanced.md +57 -51
- package/skills/ti-guides/references/hello-world.md +36 -36
- package/skills/ti-guides/references/hyperloop-native-access.md +66 -66
- package/skills/ti-guides/references/javascript-primer.md +83 -101
- package/skills/ti-guides/references/reserved-words.md +9 -9
- package/skills/ti-guides/references/resources.md +75 -83
- package/skills/ti-guides/references/style-and-conventions.md +35 -28
- package/skills/ti-guides/references/tiapp-config.md +110 -74
- package/skills/ti-howtos/SKILL.md +88 -92
- package/skills/ti-howtos/references/android-platform-deep-dives.md +104 -104
- package/skills/ti-howtos/references/automation-fastlane-appium.md +39 -39
- package/skills/ti-howtos/references/buffer-codec-streams.md +60 -60
- package/skills/ti-howtos/references/cross-platform-development.md +115 -136
- package/skills/ti-howtos/references/debugging-profiling.md +167 -181
- package/skills/ti-howtos/references/extending-titanium.md +121 -121
- package/skills/ti-howtos/references/google-maps-v2.md +84 -82
- package/skills/ti-howtos/references/ios-map-kit.md +65 -60
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +123 -123
- package/skills/ti-howtos/references/local-data-sources.md +79 -78
- package/skills/ti-howtos/references/location-and-maps.md +116 -120
- package/skills/ti-howtos/references/media-apis.md +87 -86
- package/skills/ti-howtos/references/notification-services.md +250 -260
- package/skills/ti-howtos/references/remote-data-sources.md +98 -93
- package/skills/ti-howtos/references/tutorials.md +226 -216
- package/skills/ti-howtos/references/using-modules.md +73 -102
- package/skills/ti-howtos/references/web-content-integration.md +101 -103
- package/skills/ti-howtos/references/webpack-build-pipeline.md +52 -44
- package/skills/ti-ui/SKILL.md +85 -85
- package/skills/ti-ui/references/accessibility-deep-dive.md +57 -57
- package/skills/ti-ui/references/animation-and-matrices.md +79 -79
- package/skills/ti-ui/references/application-structures.md +96 -99
- package/skills/ti-ui/references/custom-fonts-styling.md +99 -99
- package/skills/ti-ui/references/event-handling.md +58 -58
- package/skills/ti-ui/references/gestures.md +62 -64
- package/skills/ti-ui/references/icons-and-splash-screens.md +88 -88
- package/skills/ti-ui/references/layouts-and-positioning.md +87 -97
- package/skills/ti-ui/references/listviews-and-performance.md +107 -107
- package/skills/ti-ui/references/orientation.md +87 -88
- package/skills/ti-ui/references/platform-ui-android.md +87 -81
- package/skills/ti-ui/references/platform-ui-ios.md +63 -61
- package/skills/ti-ui/references/scrolling-views.md +29 -29
- package/skills/ti-ui/references/tableviews.md +56 -56
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Icons and
|
|
1
|
+
# Icons and splash screens
|
|
2
2
|
|
|
3
3
|
## 1. Overview
|
|
4
4
|
|
|
5
|
-
App icons and splash screens are required for app store submissions and
|
|
5
|
+
App icons and splash screens are required for app store submissions and give users a branded first impression.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Tools for asset generation:
|
|
8
8
|
- [TiCons website](http://ticons.fokkezb.nl/)
|
|
9
9
|
- [TiCons CLI](https://www.npmjs.org/package/ticons)
|
|
10
10
|
- [Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio/index.html)
|
|
11
11
|
|
|
12
|
-
## 2. Asset
|
|
12
|
+
## 2. Asset locations
|
|
13
13
|
|
|
14
|
-
| Platform | Classic
|
|
14
|
+
| Platform | Classic project | Alloy project |
|
|
15
15
|
| --------------- | --------------------------------------- | ----------------------------------------- |
|
|
16
16
|
| Shared | `Resources/` | `app/assets/` |
|
|
17
17
|
| iOS | `Resources/iphone/` or `Resources/ios/` | `app/assets/iphone/` or `app/assets/ios/` |
|
|
18
18
|
| Android | `Resources/android/` | `app/assets/android/` |
|
|
19
19
|
| Android density | `platform/android/res/drawable-*dpi/` | `app/platform/android/res/drawable-*dpi/` |
|
|
20
20
|
|
|
21
|
-
## 3. DefaultIcon.png (
|
|
21
|
+
## 3. DefaultIcon.png (recommended)
|
|
22
22
|
|
|
23
|
-
Place a single `DefaultIcon.png` (
|
|
23
|
+
Place a single `DefaultIcon.png` (1024x1024 px) in the project root. Titanium auto-generates missing icon sizes.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
- Square (equal height
|
|
25
|
+
Requirements:
|
|
26
|
+
- Square (equal height and width)
|
|
27
27
|
- No alpha channel
|
|
28
28
|
- PNG format
|
|
29
|
-
- At least
|
|
29
|
+
- At least 1024x1024 px
|
|
30
30
|
|
|
31
|
-
## 4. iOS
|
|
31
|
+
## 4. iOS icons
|
|
32
32
|
|
|
33
|
-
### App
|
|
33
|
+
### App icons
|
|
34
34
|
|
|
35
35
|
| Device | Dimensions | Filename |
|
|
36
36
|
| --------------- | ---------- | --------------------- |
|
|
@@ -40,7 +40,7 @@ Place a single `DefaultIcon.png` (1024x1024px) in project root. Titanium auto-ge
|
|
|
40
40
|
| iPad retina | 152x152 | `appicon-76@2x.png` |
|
|
41
41
|
| iPad Pro | 167x167 | `appicon-83.5@2x.png` |
|
|
42
42
|
|
|
43
|
-
### Spotlight
|
|
43
|
+
### Spotlight and Settings icons
|
|
44
44
|
|
|
45
45
|
| Device | Purpose | Dimensions | Filename |
|
|
46
46
|
| -------------------- | --------- | ---------- | ------------------------- |
|
|
@@ -51,9 +51,9 @@ Place a single `DefaultIcon.png` (1024x1024px) in project root. Titanium auto-ge
|
|
|
51
51
|
| Universal retina | Settings | 58x58 | `appicon-Small@2x.png` |
|
|
52
52
|
| iPhone 6 Plus+ | Settings | 87x87 | `appicon-Small@3x.png` |
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
App thinning note: Application icons and launch images are added to the Asset Catalog. You cannot reference launch image assets from the filesystem, so you cannot set `backgroundImage` to a launch image file.
|
|
55
55
|
|
|
56
|
-
### iOS
|
|
56
|
+
### iOS splash screens
|
|
57
57
|
|
|
58
58
|
| Device | Dimensions | Filename |
|
|
59
59
|
| --------------------------------------- | ---------- | -------------------------------- |
|
|
@@ -82,25 +82,25 @@ Place a single `DefaultIcon.png` (1024x1024px) in project root. Titanium auto-ge
|
|
|
82
82
|
| iPad retina landscape | 2048x1536 | `Default-Landscape@2x.png` |
|
|
83
83
|
| iPad retina portrait | 1536x2048 | `Default-Portrait@2x.png` |
|
|
84
84
|
|
|
85
|
-
### iTunes
|
|
85
|
+
### iTunes artwork (ad-hoc builds)
|
|
86
86
|
|
|
87
87
|
| Dimensions | Filename |
|
|
88
88
|
| ---------- | --------------------------------- |
|
|
89
89
|
| 512x512 | `iTunesArtwork` (no extension) |
|
|
90
90
|
| 1024x1024 | `iTunesArtwork@2x` (no extension) |
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Note: Do not include in App Store builds.
|
|
93
93
|
|
|
94
|
-
### iTunes Connect
|
|
94
|
+
### iTunes Connect requirements
|
|
95
95
|
|
|
96
96
|
| Purpose | Dimensions | Format |
|
|
97
97
|
| -------------- | --------------- | ------------------------ |
|
|
98
98
|
| Large app icon | 1024x1024 | JPG/PNG, no transparency |
|
|
99
99
|
| Screenshots | Device-specific | JPG/PNG, no transparency |
|
|
100
100
|
|
|
101
|
-
## 5. Android
|
|
101
|
+
## 5. Android icons
|
|
102
102
|
|
|
103
|
-
### Launcher
|
|
103
|
+
### Launcher icons
|
|
104
104
|
|
|
105
105
|
| Density | DPI | Dimensions | Location |
|
|
106
106
|
| ------- | --- | ---------- | --------------------------------------------------- |
|
|
@@ -111,11 +111,11 @@ Place a single `DefaultIcon.png` (1024x1024px) in project root. Titanium auto-ge
|
|
|
111
111
|
| xxhdpi | 480 | 144x144 | `platform/android/res/drawable-xxhdpi/appicon.png` |
|
|
112
112
|
| xxxhdpi | 640 | 512x512 | `platform/android/res/drawable-xxxhdpi/appicon.png` |
|
|
113
113
|
|
|
114
|
-
The filename must match the `icon` element in your tiapp.xml
|
|
114
|
+
The filename must match the `icon` element in your `tiapp.xml`. By default, new projects use `Resources/android/appicon.png`.
|
|
115
115
|
|
|
116
|
-
### Action
|
|
116
|
+
### Action bar icons
|
|
117
117
|
|
|
118
|
-
| Density | Dimensions | Classic
|
|
118
|
+
| Density | Dimensions | Classic location | Alloy location |
|
|
119
119
|
| ------- | ---------- | --------------------------------------- | ---------------------------------------- |
|
|
120
120
|
| ldpi | 18x18 | `Resources/android/images/res-ldpi/` | `app/assets/android/images/res-ldpi/` |
|
|
121
121
|
| mdpi | 24x24 | `Resources/android/images/res-mdpi/` | `app/assets/android/images/res-mdpi/` |
|
|
@@ -124,9 +124,9 @@ The filename must match the `icon` element in your tiapp.xml file. By default, n
|
|
|
124
124
|
| xxhdpi | 72x72 | `Resources/android/images/res-xxhdpi/` | `app/assets/android/images/res-xxhdpi/` |
|
|
125
125
|
| xxxhdpi | 144x144 | `Resources/android/images/res-xxxhdpi/` | `app/assets/android/images/res-xxxhdpi/` |
|
|
126
126
|
|
|
127
|
-
### Small and
|
|
127
|
+
### Small and contextual icons
|
|
128
128
|
|
|
129
|
-
Used for
|
|
129
|
+
Used for status bar icons and other small UI elements:
|
|
130
130
|
|
|
131
131
|
| Density | Dimensions |
|
|
132
132
|
| ------- | ---------- |
|
|
@@ -135,13 +135,13 @@ Used for notification status bar icons and other small UI elements:
|
|
|
135
135
|
| hdpi | 24x24 |
|
|
136
136
|
| xhdpi | 32x32 |
|
|
137
137
|
|
|
138
|
-
### Notification
|
|
138
|
+
### Notification icons
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Important: Use white-only shapes on transparent backgrounds.
|
|
141
141
|
|
|
142
|
-
Same density
|
|
142
|
+
Same density and location structure as action bar icons, but in `platform/android/res/drawable-*dpi/`.
|
|
143
143
|
|
|
144
|
-
### Google Play
|
|
144
|
+
### Google Play requirements
|
|
145
145
|
|
|
146
146
|
| Purpose | Dimensions | Format |
|
|
147
147
|
| --------------- | ---------- | ------------------- |
|
|
@@ -150,13 +150,13 @@ Same density/location structure as action bar icons, but in `platform/android/re
|
|
|
150
150
|
| Feature graphic | 1024x500 | PNG/JPG, no alpha |
|
|
151
151
|
| Promotional | 180x120 | PNG/JPG, no alpha |
|
|
152
152
|
|
|
153
|
-
## 6. Android
|
|
153
|
+
## 6. Android splash screens
|
|
154
154
|
|
|
155
155
|
### Android 12+ (SDK 12.0.0+)
|
|
156
156
|
|
|
157
|
-
Android 12 uses app icon as splash screen automatically. Use
|
|
157
|
+
Android 12 uses the app icon as the splash screen automatically. Use adaptive icons for best results.
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
Customize splash background color via theme:
|
|
160
160
|
|
|
161
161
|
```xml
|
|
162
162
|
<!-- tiapp.xml -->
|
|
@@ -193,23 +193,23 @@ Android 12 uses app icon as splash screen automatically. Use **Adaptive Icons**
|
|
|
193
193
|
</layer-list>
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
### Android < 12 (
|
|
196
|
+
### Android < 12 (legacy)
|
|
197
197
|
|
|
198
|
-
Use `default.png` or nine-patch images. Android
|
|
198
|
+
Use `default.png` or nine-patch images. Android expects `default.png` (lowercase d) for splash screens. iOS uses `Default.png` with an uppercase D.
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
Warning: Do not use `<supports-screens/>` with `android:anyDensity` set to false. It can cause scaling issues with splash screens.
|
|
201
201
|
|
|
202
|
-
#### Nine-
|
|
202
|
+
#### Nine-patch images (recommended)
|
|
203
203
|
|
|
204
204
|
Nine-patch images define stretchable regions for different screen sizes.
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
1. Create PNG with
|
|
208
|
-
2. Mark stretchable areas with black pixels on top
|
|
209
|
-
3. Mark
|
|
210
|
-
4. Name file with `.9.png` extension
|
|
206
|
+
Creating:
|
|
207
|
+
1. Create a PNG with a 1 px transparent or white border.
|
|
208
|
+
2. Mark stretchable areas with black pixels on the top and left borders.
|
|
209
|
+
3. Mark content areas with black pixels on the right and bottom borders.
|
|
210
|
+
4. Name the file with a `.9.png` extension.
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
Usage:
|
|
213
213
|
```javascript
|
|
214
214
|
// Reference without .9 in code
|
|
215
215
|
const button = Ti.UI.createButton({
|
|
@@ -217,7 +217,7 @@ const button = Ti.UI.createButton({
|
|
|
217
217
|
});
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
#### Density-
|
|
220
|
+
#### Density-specific splash screens
|
|
221
221
|
|
|
222
222
|
```
|
|
223
223
|
platform/android/res/
|
|
@@ -230,9 +230,9 @@ platform/android/res/
|
|
|
230
230
|
└── drawable-nodpi/background.9.png (universal fallback)
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
|
|
233
|
+
Warning: Do not use `drawable/` (without suffix). It causes scaling issues. Use `drawable-nodpi/` for universal images.
|
|
234
234
|
|
|
235
|
-
#### Custom
|
|
235
|
+
#### Custom theme splash screen
|
|
236
236
|
|
|
237
237
|
```xml
|
|
238
238
|
<!-- platform/android/res/values/mytheme.xml -->
|
|
@@ -263,9 +263,9 @@ platform/android/res/
|
|
|
263
263
|
</android>
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
## 7. Localized
|
|
266
|
+
## 7. Localized splash screens
|
|
267
267
|
|
|
268
|
-
### Android
|
|
268
|
+
### Android localization
|
|
269
269
|
|
|
270
270
|
Place images in `res-<lang>` folders:
|
|
271
271
|
|
|
@@ -277,11 +277,11 @@ Resources/android/images/
|
|
|
277
277
|
└── res-long-land-hdpi/default.png
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
-
Localized images take precedence over non-localized.
|
|
280
|
+
Localized images take precedence over non-localized ones.
|
|
281
281
|
|
|
282
|
-
### iOS
|
|
282
|
+
### iOS localization
|
|
283
283
|
|
|
284
|
-
Place in `i18n/<lang
|
|
284
|
+
Place them in `i18n/<lang>/`:
|
|
285
285
|
|
|
286
286
|
```
|
|
287
287
|
i18n/
|
|
@@ -293,11 +293,11 @@ i18n/
|
|
|
293
293
|
└── Default-568h@2x.png
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
-
## 8. Adaptive
|
|
296
|
+
## 8. Adaptive icons (Android 8.0+)
|
|
297
297
|
|
|
298
|
-
Adaptive icons
|
|
298
|
+
Adaptive icons use foreground and background layers.
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
Structure:
|
|
301
301
|
```
|
|
302
302
|
platform/android/res/
|
|
303
303
|
├── mipmap-anydpi-v26/
|
|
@@ -307,7 +307,7 @@ platform/android/res/
|
|
|
307
307
|
│ └── ic_launcher_background.xml
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
appicon.xml:
|
|
311
311
|
```xml
|
|
312
312
|
<?xml version="1.0" encoding="utf-8"?>
|
|
313
313
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
@@ -316,34 +316,34 @@ platform/android/res/
|
|
|
316
316
|
</adaptive-icon>
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
## 9. Common
|
|
319
|
+
## 9. Common issues
|
|
320
320
|
|
|
321
|
-
### Build
|
|
321
|
+
### Build fails - missing icons
|
|
322
322
|
|
|
323
|
-
If any app icon files are missing, the build
|
|
323
|
+
If any app icon files are missing, the build fails. If launch image files (prefixed with `Default`) are missing, the build does not fail. If you have a `DefaultIcon.png` in the project root, the Titanium SDK auto-generates missing iTunesArtwork files.
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
Solution: Add `DefaultIcon.png` (1024x1024) to the project root for auto-generation.
|
|
326
326
|
|
|
327
|
-
### Android
|
|
327
|
+
### Android splash stretched or distorted
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
Solution: Use nine-patch images or the `drawable-nodpi` folder.
|
|
330
330
|
|
|
331
|
-
### iOS
|
|
331
|
+
### iOS icons not updating
|
|
332
332
|
|
|
333
|
-
|
|
334
|
-
1. Clean project
|
|
335
|
-
2. Delete `build/` folder
|
|
336
|
-
3. Rebuild
|
|
333
|
+
Solution:
|
|
334
|
+
1. Clean the project.
|
|
335
|
+
2. Delete the `build/` folder.
|
|
336
|
+
3. Rebuild.
|
|
337
337
|
|
|
338
|
-
### Android 12
|
|
338
|
+
### Android 12 splash not showing custom image
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
Solution: Android 12+ uses the app icon by default. You can only customize the background color via `windowSplashScreenBackground`.
|
|
341
341
|
|
|
342
|
-
## 11. iOS
|
|
342
|
+
## 11. iOS launch files (storyboards)
|
|
343
343
|
|
|
344
|
-
Since iOS 8, Apple recommends
|
|
344
|
+
Since iOS 8, Apple recommends launch storyboards instead of multiple `Default*.png` images. You get one file that works across device sizes and a smaller IPA.
|
|
345
345
|
|
|
346
|
-
### Enabling
|
|
346
|
+
### Enabling launch storyboards
|
|
347
347
|
|
|
348
348
|
In the `<ios>` section of `tiapp.xml`:
|
|
349
349
|
|
|
@@ -351,7 +351,7 @@ In the `<ios>` section of `tiapp.xml`:
|
|
|
351
351
|
<enable-launch-screen-storyboard>true</enable-launch-screen-storyboard>
|
|
352
352
|
```
|
|
353
353
|
|
|
354
|
-
### Customizing
|
|
354
|
+
### Customizing background color
|
|
355
355
|
|
|
356
356
|
Set a default background color for the launch screen and the gap before the first view opens:
|
|
357
357
|
|
|
@@ -359,28 +359,28 @@ Set a default background color for the launch screen and the gap before the firs
|
|
|
359
359
|
<default-background-color>#C7172C</default-background-color>
|
|
360
360
|
```
|
|
361
361
|
|
|
362
|
-
### Using
|
|
362
|
+
### Using images in storyboards
|
|
363
363
|
|
|
364
|
-
To use an image in a
|
|
365
|
-
1. Set the `Image` property
|
|
366
|
-
2.
|
|
364
|
+
To use an image in a native Storyboard:
|
|
365
|
+
1. Set the Image View's `Image` property to the path under `app/assets/` without extension or modifiers.
|
|
366
|
+
2. App thinning note: If `use-app-thinning` is enabled, use the generated asset catalog name.
|
|
367
367
|
- Build the app.
|
|
368
|
-
-
|
|
369
|
-
- Use that
|
|
368
|
+
- Find the `[hash].imageset` under `build/iphone/Assets.xcassets/`.
|
|
369
|
+
- Use that hash value in the Storyboard.
|
|
370
370
|
|
|
371
|
-
### Launch
|
|
371
|
+
### Launch file cache
|
|
372
372
|
|
|
373
|
-
iOS caches launch screen snapshots. If changes
|
|
373
|
+
iOS caches launch screen snapshots. If changes do not appear:
|
|
374
374
|
1. Reset Content and Settings in the Simulator.
|
|
375
375
|
2. Run `ti clean` or Project > Clean.
|
|
376
376
|
|
|
377
|
-
## Best
|
|
377
|
+
## Best practices
|
|
378
378
|
|
|
379
|
-
1.
|
|
380
|
-
2.
|
|
381
|
-
3.
|
|
382
|
-
4.
|
|
383
|
-
5.
|
|
384
|
-
6.
|
|
385
|
-
7.
|
|
386
|
-
8.
|
|
379
|
+
1. Use `DefaultIcon.png` for automatic icon generation.
|
|
380
|
+
2. Use nine-patch for Android splash screens.
|
|
381
|
+
3. Test on multiple densities, especially Android.
|
|
382
|
+
4. Keep icons simple. Details vanish at small sizes.
|
|
383
|
+
5. No alpha channel on app icons.
|
|
384
|
+
6. Square icons only.
|
|
385
|
+
7. Clean the project after icon changes.
|
|
386
|
+
8. Use adaptive icons for Android 8.0+.
|