@@ -40,15 +40,15 @@ import WebKit
4040let kUserContentMessageNameClick = " click "
4141let kUserContentMessageNameMouseOver = " mouseover "
4242
43- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
43+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
4444@objc public protocol AAChartViewDelegate : NSObjectProtocol {
4545 @objc optional func aaChartViewDidFinishLoad( _ aaChartView: AAChartView )
4646 @objc optional func aaChartViewDidFinishEvaluate( _ aaChartView: AAChartView )
4747 @objc optional func aaChartView( _ aaChartView: AAChartView , clickEventMessage: AAClickEventMessageModel )
4848 @objc optional func aaChartView( _ aaChartView: AAChartView , moveOverEventMessage: AAMoveOverEventMessageModel )
4949}
5050
51- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
51+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
5252public class AAEventMessageModel : NSObject {
5353 public var name : String ?
5454 public var x : Float ?
@@ -58,14 +58,14 @@ public class AAEventMessageModel: NSObject {
5858 public var index : Int ?
5959}
6060
61- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
61+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
6262public class AAClickEventMessageModel : AAEventMessageModel { }
6363
64- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
64+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
6565public class AAMoveOverEventMessageModel : AAEventMessageModel { }
6666
6767//Refer to: https://stackoverflow.com/questions/26383031/wkwebview-causes-my-view-controller-to-leak
68- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
68+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
6969public class AALeakAvoider : NSObject , WKScriptMessageHandler {
7070 weak var delegate : WKScriptMessageHandler ?
7171
@@ -82,7 +82,7 @@ public class AALeakAvoider : NSObject, WKScriptMessageHandler {
8282 }
8383}
8484
85- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
85+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
8686public class AAChartView : WKWebView {
8787 private var clickEventEnabled : Bool ?
8888 private var touchEventEnabled : Bool ?
@@ -304,7 +304,7 @@ public class AAChartView: WKWebView {
304304
305305
306306// MARK: - Configure Chart View Content With AAChartModel
307- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
307+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
308308extension AAChartView {
309309 /// Function of drawing chart view
310310 ///
@@ -339,7 +339,7 @@ extension AAChartView {
339339}
340340
341341// MARK: - Configure Chart View Content With AAOptions
342- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
342+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
343343extension AAChartView {
344344 /// Function of drawing chart view
345345 ///
@@ -391,7 +391,7 @@ extension AAChartView {
391391}
392392
393393// MARK: - Addtional update Chart View Content methods
394- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
394+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
395395extension AAChartView {
396396 /// A common chart update function
397397 /// (you can update any chart element) to open, close, delete, add, resize, reformat, etc. elements in the chart.
@@ -609,7 +609,7 @@ extension AAChartView {
609609}
610610
611611// MARK: - WKUIDelegate
612- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
612+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
613613extension AAChartView : WKUIDelegate {
614614 open func webView(
615615 _ webView: WKWebView ,
@@ -650,7 +650,7 @@ extension AAChartView: WKUIDelegate {
650650}
651651
652652// MARK: - WKNavigationDelegate
653- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
653+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
654654extension AAChartView : WKNavigationDelegate {
655655 open func webView( _ webView: WKWebView , didFinish navigation: WKNavigation ! ) {
656656 drawChart ( )
@@ -659,7 +659,7 @@ extension AAChartView: WKNavigationDelegate {
659659}
660660
661661// MARK: - WKScriptMessageHandler
662- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
662+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
663663extension AAChartView : WKScriptMessageHandler {
664664 open func userContentController( _ userContentController: WKUserContentController , didReceive message: WKScriptMessage ) {
665665 if message. name == kUserContentMessageNameClick {
@@ -674,7 +674,7 @@ extension AAChartView: WKScriptMessageHandler {
674674 }
675675}
676676
677- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
677+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
678678extension AAChartView {
679679 private func getClickEventMessageModel( messageBody: [ String : Any ] ) -> AAClickEventMessageModel {
680680 let eventMessageModel = getEventMessageModel ( messageBody: messageBody)
@@ -732,7 +732,7 @@ extension AAChartView {
732732}
733733
734734// MARK: - JSONSerialization
735- @available ( iOS 11 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
735+ @available ( iOS 10 . 0 , macCatalyst 13 . 1 , macOS 10 . 13 , * )
736736extension AAChartView {
737737
738738 func getJSONStringFromDictionary( dictionary: [ String : Any ] ) -> String {
0 commit comments