You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/source/references/advanced/extend-to-ios.md
+19-17
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ version: 2.1
6
6
---
7
7
8
8
# Extend to iOS
9
-
9
+
10
10
### Module extend
11
11
12
12
Weex SDK provides only rendering capabilities, rather than have other capabilities, such as network, picture, and URL redirection. If you want these features, you need to implement it.
@@ -15,11 +15,11 @@ For example: If you want to implement an address jumping function, you can achie
15
15
16
16
#### Step to customize a module
17
17
18
-
1. Module
18
+
1. Module
19
19
customized must implement WXModuleProtocol
20
-
2. A macro named `WX_EXPORT_METHOD` must be added, as it is the only way to be recognized by Weex. It takes arguments that specifies the method in module called by JavaScript code.
20
+
2. A macro named `WX_EXPORT_METHOD` must be added, as it is the only way to export methods to JavaScript.
21
21
3. The weexInstance should be synthesized. Each module object is bind to a specific instance.
22
-
4. Module methods will be invoked in UI thread, so do not put time consuming operation there. If you want to execute the whole module methods in other thread, please implement the method `- (NSThread *)targetExecuteThread` in protocol. In the way, tasks distributed to this module will be executed in targetExecuteThread.
22
+
4. Module methods will be invoked in UI thread, so do not put time consuming operation there. If you want to execute the whole module methods in other thread, please implement the method `- (NSThread *)targetExecuteThread` in protocol. In the way, tasks distributed to this module will be executed in targetExecuteThread.
23
23
5. Weex params can be String or Map.
24
24
6. Module supports to return results to Javascript in callback. This callback is type of `WXModuleCallback`, the params of which can be String or Map.
25
25
@@ -46,7 +46,9 @@ For example: If you want to implement an address jumping function, you can achie
46
46
47
47
@end
48
48
```
49
-
49
+
50
+
In addition, `0.10.0` begins to support synchronous module API call, you can use macro `WX_EXPORT_METHOD_SYNC` to export module methods which could make JavaScript receive return values from native, it **can only be called on JS thread**.
51
+
50
52
#### Register the module
51
53
52
54
You can register the customized module by calling the method `registerModule:withClass` in WXSDKEngine.
Copy file name to clipboardexpand all lines: doc/source/references/components/cell.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -17,19 +17,21 @@ This type of component supports all kinds of weex component as its child compone
17
17
18
18
### Attributes
19
19
20
-
There is no specific attribute for this component other than the [common attributes](../common-attrs.html).
20
+
**common attributes**: check out the [common attributes](../common-attrs.html).
21
21
22
22
**Notes:** you can't give `<cell>` a `flex` value. Width of `<cell>` is equal to the width of its parent component `<list>`, and you don't need to specify its height.
23
23
24
24
### Styles
25
25
26
-
**common styles**: check out the [common styles](../common-attrs.html)
26
+
**common styles**: check out the [common styles](../common-style.html)
27
27
28
28
- support flexbox related styles
29
29
- support box model related styles
30
30
- support ``position`` related styles
31
31
- support ``opacity``, ``background-color`` etc.
32
32
33
+
**Notes:** cell itself is a container, its layout info is managed by list, so specifying cell's margin info will not work.
34
+
33
35
### Events
34
36
35
37
**common events**: check out the [common events](../common-event.html)
Copy file name to clipboardexpand all lines: doc/source/references/gesture.md
+6-3
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@ For now, there are four types of gestures:
23
23
* `panstart`
24
24
* `panmove`
25
25
* `panend`
26
+
***Horizontal/Vertical Pan** <spanclass="api-version">v0.10+</span> . Mainly used for cell swipe gestures before conflict resolving system is completed. start/move/end state of the gesture will be passed by `state` property. **Note**: These gestures are in conflict with click event on Android currently.
27
+
*`horizontalpan`
28
+
*`verticalpan`
26
29
***Swipe**. Swipe is fired when user swipe a touch point on the screen. A serial of motion will only trigger one Swipe gesture.
27
30
***LongPress**. Swipe is fired when a touch point is held for 500 ms or more.
28
31
@@ -37,17 +40,17 @@ Users may choose their gesture according to their situation.
37
40
The following properties can be used in gesture callback:
38
41
39
42
*`direction`. Only exists for **Swipe** gesture. Indicate the direcion of the swipe, choose from `up`, `left`, `bottom`, `right`.
40
-
*`changedTouches`. An array of motion for every touch pointer that has contribute to the current gesture.
43
+
*`changedTouches`. An array of motion for every touch pointer that has contribute to the current gesture.
41
44
42
45
### changedTouches
43
46
44
47
`changedTouches` is an array, with the following properties in its children:
45
48
46
49
*`identifier`. A unique identifier for a touch pointer.
47
-
*`pageX`. The X coordinate of the touch pointer relative to the left edge of the document.
50
+
*`pageX`. The X coordinate of the touch pointer relative to the left edge of the document.
48
51
*`pageY`. The Y coordinate of the touch pointer relative to the top of the document.
49
52
*`screenX`. The X coordinate of the touch point relative to the left edge of the screen.
50
53
*`screenY`. The Y coordinate of the touch point relative to the top edge of the screen.
51
54
52
55
## Constrain
53
-
Currently, Weex Android do not support listening to gesture on `scroller`, `list` and `webview`, as it would lead a large amount of event conflicting.
56
+
Currently, Weex Android do not support listening to gesture on `scroller`, `list` and `webview`, as it would lead a large amount of event conflicting.
0 commit comments