@lodev09/react-native-true-sheet 0.12.2 → 0.12.4

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.
package/README.md CHANGED
@@ -34,9 +34,10 @@ cd ios && pod install
34
34
 
35
35
  ## Documentation
36
36
 
37
+ - [Example](example)
37
38
  - [Guides](https://sheet.lodev09.com/category/guides)
38
39
  - [Reference](https://sheet.lodev09.com/category/reference)
39
- - [Example](example)
40
+ - [Troubleshooting](https://sheet.lodev09.com/troubleshooting)
40
41
 
41
42
  ## Usage
42
43
 
@@ -80,3 +81,7 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the
80
81
  ## License
81
82
 
82
83
  [MIT](LICENSE)
84
+
85
+ ---
86
+
87
+ Made with ❤️ by [@lodev09](http://linkedin.com/in/lodev09/)
package/TrueSheet.podspec CHANGED
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.license = package["license"]
12
12
  s.authors = package["author"]
13
13
 
14
- s.platforms = { :ios => min_ios_version_supported }
14
+ s.platforms = { :ios => "13.4" }
15
15
  s.source = { :git => "https://github.com/lodev09/react-native-true-sheet.git", :tag => "#{s.version}" }
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
@@ -172,13 +172,13 @@ class TrueSheetView(context: Context) :
172
172
  // Initialize content
173
173
  UiThreadUtil.runOnUiThread {
174
174
  // 1st child is the content view
175
- val contentView = it.getChildAt(0) as ViewGroup
176
- setContentHeight(contentView.height)
175
+ val contentView = it.getChildAt(0) as ViewGroup?
176
+ setContentHeight(contentView?.height ?: 0)
177
177
 
178
178
  // 2nd child is the footer view
179
- val footerView = it.getChildAt(1) as ViewGroup
179
+ val footerView = it.getChildAt(1) as ViewGroup?
180
180
  sheetDialog.footerView = footerView
181
- setFooterHeight(footerView.height)
181
+ setFooterHeight(footerView?.height ?: 0)
182
182
 
183
183
  if (initialIndex >= 0) {
184
184
  currentSizeIndex = initialIndex
@@ -45,6 +45,11 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
45
45
 
46
46
  private var rctScrollView: RCTScrollView?
47
47
 
48
+ private var uiManager: RCTUIManager? {
49
+ guard let uiManager = bridge?.uiManager else { return nil }
50
+ return uiManager
51
+ }
52
+
48
53
  // MARK: - Setup
49
54
 
50
55
  init(with bridge: RCTBridge) {
@@ -143,7 +148,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
143
148
  guard let containerView else { return }
144
149
 
145
150
  let size = CGSize(width: width, height: containerView.bounds.height)
146
- bridge?.uiManager.setSize(size, for: containerView)
151
+ uiManager?.setSize(size, for: containerView)
147
152
  }
148
153
 
149
154
  func viewControllerWillAppear() {
@@ -297,7 +302,7 @@ class TrueSheetView: UIView, RCTInvalidating, TrueSheetViewControllerDelegate {
297
302
 
298
303
  @objc
299
304
  func setScrollableHandle(_ tag: NSNumber?) {
300
- let view = bridge?.uiManager.view(forReactTag: tag) as? RCTScrollView
305
+ let view = uiManager?.view(forReactTag: tag) as? RCTScrollView
301
306
  rctScrollView = view
302
307
  }
303
308
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lodev09/react-native-true-sheet",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "description": "The true native bottom sheet experience for your React Native Apps.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",