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: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
# JavaScript-iOS Screenshots
1
+
# JavaScript-iOS
2
+
This project is a test project that invokes `JavaScript` from native `Swift` code. `WKWebKit` is used to invoke `JavaScript`. Initially `JavaScript` is loaded from a web url in `String` form and evaluated using `WKWebView` instance. `Operation` enum represents a single operation which will be created using JS function `startOperation`. 4 different operations are created and 4 different progress UI elements are used to represent each operation. Progress UI elements are custom UIView's (`HorizontalProgressBar` and `CircularProgressBar`). A MessageHandler (`jumbo` here) is added to `WKWebViewConfiguration's``userContentController` which receives the messages posted on the handler through `WKScriptMessageHandler's` delegate method `didReceive`. Upon receiving a new message, it is identified which operation this message belongs to and that operation's UI progress is updated accordingly using `handleMessage` (inside `VaccineTrialViewController`).
3
+
4
+
## Unit Tests
5
+
There are 4 unit tests added `JavaScriptTests`
2
6
3
7
## Operations in progress
4
8
<imgwidth="412"alt="Screenshot 2020-09-03 at 9 29 50 PM"src="https://user-images.githubusercontent.com/12998613/92148263-f3db3f00-ee39-11ea-9bf5-3e17a103e226.png">
0 commit comments