@readyio/react-native-wallet 0.1.24 → 0.1.25

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.
@@ -13,16 +13,18 @@ class ReadyWalletSplash: NSObject {
13
13
  let storyboard = UIStoryboard(name: "ReadySplash", bundle: nil)
14
14
  loadingView = (storyboard.instantiateInitialViewController()?.view)!
15
15
 
16
- // Add Backgroung color
17
- let newLayer = CAGradientLayer()
18
- newLayer.colors = [UIColor(red: 70/255.0, green: 213/255.0, blue: 205/255.0, alpha: 1).cgColor, UIColor(red: 17/255.0, green: 101/255.0, blue: 97/255.0, alpha: 1).cgColor ]
19
- newLayer.frame = loadingView!.bounds
20
- loadingView?.layer.addSublayer(newLayer)
21
-
22
16
  animationView = .init(name: "ReadyWalletSplash")
23
- // animationView?.frame = loadingView!.bounds
24
- animationView?.frame = CGRect(x: (loadingView!.bounds.size.width - 219) / 2 , y: (loadingView!.bounds.size.height - 329) / 2 - 50, width: 219, height: 329)
25
- animationView!.contentMode = .scaleToFill
17
+
18
+ animationView!.contentMode = .scaleAspectFit
19
+ // Calculate the scaled size
20
+ let scale = min(loadingView!.bounds.size.width / 720,
21
+ loadingView!.bounds.size.height / 1192)
22
+ let width = 720 * scale
23
+ let height = 1192 * scale
24
+ animationView?.frame = CGRect(x: (loadingView!.bounds.size.width - width) / 2,
25
+ y: loadingView!.bounds.size.height - height,
26
+ width: width,
27
+ height: height)
26
28
  animationView!.loopMode = .playOnce
27
29
  animationView!.animationSpeed = 1.2
28
30
  loadingView?.addSubview(animationView!)
@@ -1,9 +1,7 @@
1
1
  import Foundation
2
2
  import React
3
3
 
4
-
5
4
  let PUSH_EVENT_NAME: String = "ReadyWallet_FOREGROUND_PUSH_EVENT"
6
-
7
5
  let AS_READY_WALLET: String = "@readyio_ready_wallet";
8
6
 
9
7
  @objc(ReadyWallet)
@@ -40,7 +38,8 @@ class ReadyWallet: RCTEventEmitter {
40
38
 
41
39
  @objc(getItem:withResolve:withRejecter:)
42
40
  func getItem(key: String, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
43
- resolve(UserDefaults.standard.string(forKey: key))
41
+ let data = UserDefaults.standard.string(forKey: key)
42
+ resolve(data)
44
43
  }
45
44
 
46
45
 
Binary file
@@ -15,7 +15,7 @@
15
15
  <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16
16
  <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17
17
  <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
18
- <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
18
+ <color key="backgroundColor" red="0.10588235294117647" green="0.13333333333333333" blue="0.1764705882352941" alpha="1" colorSpace="calibratedRGB"/>
19
19
  </view>
20
20
  </viewController>
21
21
  <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>