diff --git a/SHARE_EXTENSION_VIEW.md b/SHARE_EXTENSION_VIEW.md index e6906fa..9e2224d 100644 --- a/SHARE_EXTENSION_VIEW.md +++ b/SHARE_EXTENSION_VIEW.md @@ -47,13 +47,13 @@ Open your Share Extension's `Info.plist` and add the following: ReactShareViewBackgroundColor Red - 1 + 1 Green - 1 + 1 Blue - 1 + 1 Alpha - 1 + 1 Transparent diff --git a/ios/Modules/ShareMenuReactView.swift b/ios/Modules/ShareMenuReactView.swift index e290cce..71a0910 100644 --- a/ios/Modules/ShareMenuReactView.swift +++ b/ios/Modules/ShareMenuReactView.swift @@ -18,7 +18,7 @@ public class ShareMenuReactView: NSObject { } public static func attachViewDelegate(_ delegate: ReactShareViewDelegate!) { - guard (ShareMenuReactView.viewDelegate == nil) else { return } + // guard (ShareMenuReactView.viewDelegate == nil) else { return } ShareMenuReactView.viewDelegate = delegate } diff --git a/ios/ReactShareViewController.swift b/ios/ReactShareViewController.swift index f42bce6..9a1c8b5 100644 --- a/ios/ReactShareViewController.swift +++ b/ios/ReactShareViewController.swift @@ -36,10 +36,10 @@ class ReactShareViewController: ShareViewController, RCTBridgeDelegate, ReactSha break backgroundColorSetup } - let red = backgroundColorConfig[COLOR_RED_KEY] as? Float ?? 1 - let green = backgroundColorConfig[COLOR_GREEN_KEY] as? Float ?? 1 - let blue = backgroundColorConfig[COLOR_BLUE_KEY] as? Float ?? 1 - let alpha = backgroundColorConfig[COLOR_ALPHA_KEY] as? Float ?? 1 + let red = (backgroundColorConfig[COLOR_RED_KEY] as? NSNumber)?.floatValue ?? 1 + let green = (backgroundColorConfig[COLOR_GREEN_KEY] as? NSNumber)?.floatValue ?? 1 + let blue = (backgroundColorConfig[COLOR_BLUE_KEY] as? NSNumber)?.floatValue ?? 1 + let alpha = (backgroundColorConfig[COLOR_ALPHA_KEY] as? NSNumber)?.floatValue ?? 1 rootView.backgroundColor = UIColor(red: CGFloat(red), green: CGFloat(green), blue: CGFloat(blue), alpha: CGFloat(alpha)) }