@maccesar/titools 2.2.4 → 2.2.9
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/agents/ti-pro.md +17 -17
- package/lib/commands/update.js +6 -14
- package/lib/downloader.js +17 -2
- 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,23 +1,22 @@
|
|
|
1
|
-
# Application
|
|
1
|
+
# Application structures and core building blocks
|
|
2
2
|
|
|
3
3
|
## 1. Overview
|
|
4
4
|
|
|
5
|
-
Titanium apps are built from three core components
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
5
|
+
Titanium apps are built from three core components.
|
|
6
|
+
- Windows: top-level containers, similar to web pages.
|
|
7
|
+
- Views: generic content containers, similar to HTML divs.
|
|
8
|
+
- TabGroups: tab-based navigation containers.
|
|
9
9
|
|
|
10
10
|
## 2. Windows
|
|
11
11
|
|
|
12
|
-
### Window
|
|
12
|
+
### Window concepts
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- Windows can run in their own execution context
|
|
18
|
-
- Windows are top-level containers that hold views
|
|
14
|
+
If you think in web terms:
|
|
15
|
+
- A window is like a page. It is the top-level container.
|
|
16
|
+
- A view is like a div. It sits inside a window.
|
|
17
|
+
- Windows can run in their own execution context.
|
|
19
18
|
|
|
20
|
-
### Creating
|
|
19
|
+
### Creating windows
|
|
21
20
|
|
|
22
21
|
```javascript
|
|
23
22
|
const win = Ti.UI.createWindow({
|
|
@@ -31,7 +30,7 @@ const win = Ti.UI.createWindow({
|
|
|
31
30
|
win.open();
|
|
32
31
|
```
|
|
33
32
|
...
|
|
34
|
-
### Window
|
|
33
|
+
### Window events
|
|
35
34
|
|
|
36
35
|
```javascript
|
|
37
36
|
win.addEventListener('open', (e) => {
|
|
@@ -51,9 +50,9 @@ win.addEventListener('blur', (e) => {
|
|
|
51
50
|
});
|
|
52
51
|
```
|
|
53
52
|
|
|
54
|
-
### Window
|
|
53
|
+
### Window lifecycle
|
|
55
54
|
|
|
56
|
-
Windows
|
|
55
|
+
Windows live in a stack. Opening a window pushes it on top. Closing it pops it off.
|
|
57
56
|
|
|
58
57
|
```javascript
|
|
59
58
|
const win1 = Ti.UI.createWindow({ title: 'Window 1' });
|
|
@@ -67,14 +66,14 @@ win2.open(); // Pushed on top of win1
|
|
|
67
66
|
|
|
68
67
|
## 3. Views
|
|
69
68
|
|
|
70
|
-
### View
|
|
69
|
+
### View concepts
|
|
71
70
|
|
|
72
|
-
Views are
|
|
73
|
-
- Hold other components (buttons, labels, etc.)
|
|
74
|
-
- Must be contained within a window
|
|
75
|
-
-
|
|
71
|
+
Views are stylable containers that:
|
|
72
|
+
- Hold other components (buttons, labels, etc.).
|
|
73
|
+
- Must be contained within a window.
|
|
74
|
+
- Map closely to HTML divs.
|
|
76
75
|
|
|
77
|
-
### Creating
|
|
76
|
+
### Creating views
|
|
78
77
|
|
|
79
78
|
```javascript
|
|
80
79
|
const view = Ti.UI.createView({
|
|
@@ -88,7 +87,7 @@ const view = Ti.UI.createView({
|
|
|
88
87
|
win.add(view);
|
|
89
88
|
```
|
|
90
89
|
|
|
91
|
-
### Common
|
|
90
|
+
### Common view types
|
|
92
91
|
|
|
93
92
|
```javascript
|
|
94
93
|
// Basic view
|
|
@@ -115,7 +114,7 @@ const webView = Ti.UI.createWebView({
|
|
|
115
114
|
});
|
|
116
115
|
```
|
|
117
116
|
|
|
118
|
-
### Adding
|
|
117
|
+
### Adding views to windows
|
|
119
118
|
|
|
120
119
|
```javascript
|
|
121
120
|
// Add single view
|
|
@@ -130,7 +129,7 @@ container.add(childView);
|
|
|
130
129
|
win.add(container);
|
|
131
130
|
```
|
|
132
131
|
|
|
133
|
-
### Removing
|
|
132
|
+
### Removing views
|
|
134
133
|
|
|
135
134
|
```javascript
|
|
136
135
|
// Remove specific view
|
|
@@ -142,9 +141,9 @@ win.removeAllChildren();
|
|
|
142
141
|
|
|
143
142
|
## 4. TabGroups
|
|
144
143
|
|
|
145
|
-
### Tab-
|
|
144
|
+
### Tab-based apps
|
|
146
145
|
|
|
147
|
-
TabGroups contain multiple tabs, each
|
|
146
|
+
TabGroups contain multiple tabs, each with a window. This is a common mobile pattern.
|
|
148
147
|
|
|
149
148
|
```javascript
|
|
150
149
|
// Create tab group
|
|
@@ -182,7 +181,7 @@ tabGroup.addTab(tab2);
|
|
|
182
181
|
tabGroup.open();
|
|
183
182
|
```
|
|
184
183
|
|
|
185
|
-
### Tab
|
|
184
|
+
### Tab properties
|
|
186
185
|
|
|
187
186
|
| Property | Description |
|
|
188
187
|
| ------------ | ---------------------- |
|
|
@@ -192,7 +191,7 @@ tabGroup.open();
|
|
|
192
191
|
| `badge` | Badge number |
|
|
193
192
|
| `activeIcon` | Icon when active (iOS) |
|
|
194
193
|
|
|
195
|
-
### Window
|
|
194
|
+
### Window titles vs tab titles
|
|
196
195
|
|
|
197
196
|
```javascript
|
|
198
197
|
const tab = Ti.UI.createTab({
|
|
@@ -203,7 +202,7 @@ const tab = Ti.UI.createTab({
|
|
|
203
202
|
});
|
|
204
203
|
```
|
|
205
204
|
|
|
206
|
-
### Tab
|
|
205
|
+
### Tab events
|
|
207
206
|
|
|
208
207
|
```javascript
|
|
209
208
|
tabGroup.addEventListener('focus', (e) => {
|
|
@@ -213,30 +212,28 @@ tabGroup.addEventListener('focus', (e) => {
|
|
|
213
212
|
});
|
|
214
213
|
```
|
|
215
214
|
|
|
216
|
-
### Tab
|
|
215
|
+
### Tab recommendations
|
|
217
216
|
|
|
218
|
-
|
|
219
|
-
- iOS
|
|
220
|
-
- Android
|
|
221
|
-
-
|
|
217
|
+
Keep tabs to four or fewer.
|
|
218
|
+
- iOS uses a fixed minimum width and shows "More" for overflow.
|
|
219
|
+
- Android shrinks tabs to fit, which can make them hard to use.
|
|
220
|
+
- On both platforms, visible tabs are easier to scan.
|
|
222
221
|
|
|
223
|
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
-
- Tabs are related within overall app purpose
|
|
222
|
+
Tabs should be peers. They are not a hierarchy.
|
|
223
|
+
- Each tab should focus on a narrow slice of functionality.
|
|
224
|
+
- All tabs should make sense as parts of a single app.
|
|
227
225
|
|
|
228
|
-
### Tab-
|
|
226
|
+
### Tab-based applications
|
|
229
227
|
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
- Each tab contains a window
|
|
233
|
-
-
|
|
234
|
-
- Most common mobile pattern
|
|
228
|
+
Typical characteristics:
|
|
229
|
+
- Two to four tabs at the bottom.
|
|
230
|
+
- Each tab contains a window.
|
|
231
|
+
- Switching between features is quick.
|
|
235
232
|
|
|
236
|
-
|
|
237
|
-
- Social networks (feed, profile, messages)
|
|
238
|
-
- News apps (headlines, sports, business)
|
|
239
|
-
- Utilities with distinct features
|
|
233
|
+
Example apps:
|
|
234
|
+
- Social networks (feed, profile, messages).
|
|
235
|
+
- News apps (headlines, sports, business).
|
|
236
|
+
- Utilities with distinct features.
|
|
240
237
|
|
|
241
238
|
```javascript
|
|
242
239
|
// Classic tab-based app
|
|
@@ -276,7 +273,7 @@ navWindow.open();
|
|
|
276
273
|
|
|
277
274
|
## 6. NavigationWindow (iOS)
|
|
278
275
|
|
|
279
|
-
NavigationWindow provides iOS-style navigation with push
|
|
276
|
+
NavigationWindow provides iOS-style navigation with push and pop transitions.
|
|
280
277
|
|
|
281
278
|
```javascript
|
|
282
279
|
const navWindow = Ti.UI.createNavigationWindow({
|
|
@@ -298,7 +295,7 @@ navWindow.openWindow(detailWin, { animated: true });
|
|
|
298
295
|
detailWin.close();
|
|
299
296
|
```
|
|
300
297
|
|
|
301
|
-
### Navigation
|
|
298
|
+
### Navigation bar customization
|
|
302
299
|
|
|
303
300
|
```javascript
|
|
304
301
|
const win = Ti.UI.createWindow({
|
|
@@ -322,9 +319,9 @@ win.rightNavButton = Ti.UI.createButton({
|
|
|
322
319
|
});
|
|
323
320
|
```
|
|
324
321
|
|
|
325
|
-
## 7. Modal
|
|
322
|
+
## 7. Modal windows
|
|
326
323
|
|
|
327
|
-
### iOS
|
|
324
|
+
### iOS modal windows
|
|
328
325
|
|
|
329
326
|
```javascript
|
|
330
327
|
const modalWin = Ti.UI.createWindow({
|
|
@@ -336,17 +333,17 @@ const modalWin = Ti.UI.createWindow({
|
|
|
336
333
|
modalWin.open({ modal: true });
|
|
337
334
|
```
|
|
338
335
|
|
|
339
|
-
|
|
340
|
-
- Fills entire screen
|
|
341
|
-
- Covers tab bar
|
|
342
|
-
- Must be explicitly closed
|
|
343
|
-
- No automatic back button
|
|
336
|
+
Modal behavior:
|
|
337
|
+
- Fills the entire screen.
|
|
338
|
+
- Covers the tab bar if the app uses tabs.
|
|
339
|
+
- Must be explicitly closed.
|
|
340
|
+
- No automatic back button.
|
|
344
341
|
|
|
345
|
-
## 8. Heavyweight vs
|
|
342
|
+
## 8. Heavyweight vs lightweight windows
|
|
346
343
|
|
|
347
|
-
### Heavyweight
|
|
344
|
+
### Heavyweight windows (Android)
|
|
348
345
|
|
|
349
|
-
Android windows are
|
|
346
|
+
Android windows are heavyweight. Each runs in its own activity and context.
|
|
350
347
|
|
|
351
348
|
```javascript
|
|
352
349
|
// Explicit heavyweight (Android)
|
|
@@ -357,13 +354,13 @@ const win = Ti.UI.createWindow({
|
|
|
357
354
|
});
|
|
358
355
|
```
|
|
359
356
|
|
|
360
|
-
|
|
361
|
-
- Each window
|
|
362
|
-
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
357
|
+
Heavyweight characteristics:
|
|
358
|
+
- Each window is a separate Android Activity.
|
|
359
|
+
- Each has its own back button handling.
|
|
360
|
+
- Each has its own lifecycle.
|
|
361
|
+
- They use more memory.
|
|
365
362
|
|
|
366
|
-
### Lightweight
|
|
363
|
+
### Lightweight windows
|
|
367
364
|
|
|
368
365
|
```javascript
|
|
369
366
|
// Lightweight (same context)
|
|
@@ -373,15 +370,15 @@ const win = Ti.UI.createWindow({
|
|
|
373
370
|
});
|
|
374
371
|
```
|
|
375
372
|
|
|
376
|
-
|
|
377
|
-
- Share context with opening window
|
|
378
|
-
- No back button (typically)
|
|
379
|
-
-
|
|
380
|
-
-
|
|
373
|
+
Lightweight characteristics:
|
|
374
|
+
- Share context with the opening window.
|
|
375
|
+
- No back button (typically).
|
|
376
|
+
- Use less memory.
|
|
377
|
+
- Create faster.
|
|
381
378
|
|
|
382
|
-
## 9. Window
|
|
379
|
+
## 9. Window hierarchy and stacking
|
|
383
380
|
|
|
384
|
-
### Understanding the
|
|
381
|
+
### Understanding the stack
|
|
385
382
|
|
|
386
383
|
```javascript
|
|
387
384
|
const win1 = Ti.UI.createWindow({ title: '1' });
|
|
@@ -404,7 +401,7 @@ win2.close();
|
|
|
404
401
|
// Stack: [win1]
|
|
405
402
|
```
|
|
406
403
|
|
|
407
|
-
### Accessing the
|
|
404
|
+
### Accessing the stack
|
|
408
405
|
|
|
409
406
|
```javascript
|
|
410
407
|
// Get current window (some contexts)
|
|
@@ -414,11 +411,11 @@ const currentWin = Ti.UI.currentWindow;
|
|
|
414
411
|
const activity = Ti.Android.currentActivity;
|
|
415
412
|
```
|
|
416
413
|
|
|
417
|
-
## 10. Platform-
|
|
414
|
+
## 10. Platform-specific navigation
|
|
418
415
|
|
|
419
|
-
### Android
|
|
416
|
+
### Android navigation patterns
|
|
420
417
|
|
|
421
|
-
|
|
418
|
+
Back button:
|
|
422
419
|
```javascript
|
|
423
420
|
win.addEventListener('androidback', (e) => {
|
|
424
421
|
// Override default behavior
|
|
@@ -438,7 +435,7 @@ win.addEventListener('androidback', (e) => {
|
|
|
438
435
|
});
|
|
439
436
|
```
|
|
440
437
|
|
|
441
|
-
|
|
438
|
+
Menu button:
|
|
442
439
|
```javascript
|
|
443
440
|
const activity = Ti.Android.currentActivity;
|
|
444
441
|
|
|
@@ -470,9 +467,9 @@ activity.onOptionsItemSelected = (e) => {
|
|
|
470
467
|
};
|
|
471
468
|
```
|
|
472
469
|
|
|
473
|
-
### iOS
|
|
470
|
+
### iOS navigation patterns
|
|
474
471
|
|
|
475
|
-
|
|
472
|
+
NavigationWindow (most common):
|
|
476
473
|
```javascript
|
|
477
474
|
const navWindow = Ti.UI.createNavigationWindow({
|
|
478
475
|
window: rootWindow
|
|
@@ -480,13 +477,13 @@ const navWindow = Ti.UI.createNavigationWindow({
|
|
|
480
477
|
navWindow.open();
|
|
481
478
|
```
|
|
482
479
|
|
|
483
|
-
|
|
480
|
+
Tab bar controller:
|
|
484
481
|
```javascript
|
|
485
482
|
const tabGroup = Ti.UI.createTabGroup();
|
|
486
483
|
tabGroup.open();
|
|
487
484
|
```
|
|
488
485
|
|
|
489
|
-
|
|
486
|
+
SplitWindow (iPad):
|
|
490
487
|
```javascript
|
|
491
488
|
const splitWin = Ti.UI.iOS.createSplitWindow({
|
|
492
489
|
masterView: masterWindow,
|
|
@@ -495,11 +492,11 @@ const splitWin = Ti.UI.iOS.createSplitWindow({
|
|
|
495
492
|
splitWin.open();
|
|
496
493
|
```
|
|
497
494
|
|
|
498
|
-
## 11. Execution
|
|
495
|
+
## 11. Execution contexts
|
|
499
496
|
|
|
500
|
-
### Lightweight
|
|
497
|
+
### Lightweight contexts
|
|
501
498
|
|
|
502
|
-
Windows share contexts by default
|
|
499
|
+
Windows share contexts by default.
|
|
503
500
|
|
|
504
501
|
```javascript
|
|
505
502
|
const win1 = Ti.UI.createWindow();
|
|
@@ -509,9 +506,9 @@ const win2 = Ti.UI.createWindow();
|
|
|
509
506
|
const sharedVariable = 123; // Accessible in both
|
|
510
507
|
```
|
|
511
508
|
...
|
|
512
|
-
## 12. Common
|
|
509
|
+
## 12. Common patterns
|
|
513
510
|
|
|
514
|
-
### Drill-
|
|
511
|
+
### Drill-down navigation
|
|
515
512
|
|
|
516
513
|
```javascript
|
|
517
514
|
// Root level
|
|
@@ -537,7 +534,7 @@ table.addEventListener('click', (e) => {
|
|
|
537
534
|
});
|
|
538
535
|
```
|
|
539
536
|
|
|
540
|
-
### Modal
|
|
537
|
+
### Modal forms
|
|
541
538
|
|
|
542
539
|
```javascript
|
|
543
540
|
function showModalForm() {
|
|
@@ -569,7 +566,7 @@ function showModalForm() {
|
|
|
569
566
|
}
|
|
570
567
|
```
|
|
571
568
|
|
|
572
|
-
### Tab with
|
|
569
|
+
### Tab with navigation
|
|
573
570
|
|
|
574
571
|
```javascript
|
|
575
572
|
const navWindow = Ti.UI.createNavigationWindow({
|
|
@@ -588,22 +585,22 @@ const tab = Ti.UI.createTab({
|
|
|
588
585
|
tabGroup.addTab(tab);
|
|
589
586
|
```
|
|
590
587
|
|
|
591
|
-
## 13. Best
|
|
588
|
+
## 13. Best practices
|
|
592
589
|
|
|
593
|
-
1.
|
|
594
|
-
2.
|
|
595
|
-
3.
|
|
596
|
-
4.
|
|
597
|
-
5.
|
|
598
|
-
6.
|
|
599
|
-
7.
|
|
590
|
+
1. Prefer TabGroups for multi-feature apps. It is the most common pattern.
|
|
591
|
+
2. Use NavigationWindow for iOS hierarchy. It matches platform expectations.
|
|
592
|
+
3. Limit to 4 tabs. All tabs visible is better UX.
|
|
593
|
+
4. Handle `androidback` with care. Confirm destructive actions.
|
|
594
|
+
5. Use modal windows for focused tasks like forms and confirmations.
|
|
595
|
+
6. Remember execution contexts. Heavyweight windows do not share variables.
|
|
596
|
+
7. Test on both platforms. Navigation differs in real use.
|
|
600
597
|
|
|
601
|
-
## 14. Platform
|
|
598
|
+
## 14. Platform differences summary
|
|
602
599
|
|
|
603
600
|
| Feature | iOS | Android |
|
|
604
601
|
| ------------- | ---------------------------- | -------------------------------------- |
|
|
605
602
|
| Modal windows | Fill screen, cover tab bar | No effect (windows always full screen) |
|
|
606
|
-
| Navigation | NavigationWindow | Back button
|
|
603
|
+
| Navigation | NavigationWindow | Back button and menu button |
|
|
607
604
|
| Tabs | Fixed width, "More" overflow | Shrink to fit |
|
|
608
605
|
| Window stack | Manual management | Back button navigation |
|
|
609
606
|
| Heavyweight | Requires fullscreen | Default behavior |
|