@sdcx/bottom-sheet 1.0.3 → 1.0.6

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.
Files changed (26) hide show
  1. package/RNBottomSheet.podspec +4 -1
  2. package/android/build.gradle +31 -43
  3. package/android/src/main/java/com/reactnative/bottomsheet/BottomSheet.java +18 -1
  4. package/android/src/main/java/com/reactnative/bottomsheet/BottomSheetContentView.java +39 -0
  5. package/android/src/main/java/com/reactnative/bottomsheet/BottomSheetContentViewManager.java +46 -0
  6. package/android/src/main/java/com/reactnative/bottomsheet/BottomSheetManager.java +42 -34
  7. package/android/src/main/java/com/reactnative/bottomsheet/BottomSheetPackage.java +2 -1
  8. package/android/src/main/jni/CMakeLists.txt +91 -0
  9. package/android/src/main/jni/bottomsheet.h +17 -0
  10. package/dist/BottomSheetContentViewNativeComponent.d.ts +5 -0
  11. package/dist/BottomSheetContentViewNativeComponent.js +4 -0
  12. package/dist/index.js +4 -3
  13. package/dist/splitLayoutProps.d.ts +2 -2
  14. package/ios/{BottomSheet/RNBottomSheet.mm → RNBottomSheet.mm} +23 -2
  15. package/ios/RNBottomSheetContentView.h +12 -0
  16. package/ios/RNBottomSheetContentView.mm +47 -0
  17. package/package.json +9 -6
  18. package/react-native.config.js +2 -1
  19. package/src/BottomSheetContentViewNativeComponent.ts +8 -0
  20. package/src/index.tsx +4 -3
  21. package/ios/BottomSheet.xcodeproj/project.pbxproj +0 -283
  22. /package/ios/{BottomSheet/Event → Event}/RNBottomSheetOffsetChangedEvent.h +0 -0
  23. /package/ios/{BottomSheet/Event → Event}/RNBottomSheetOffsetChangedEvent.mm +0 -0
  24. /package/ios/{BottomSheet/Event → Event}/RNBottomSheetStateChangedEvent.h +0 -0
  25. /package/ios/{BottomSheet/Event → Event}/RNBottomSheetStateChangedEvent.mm +0 -0
  26. /package/ios/{BottomSheet/RNBottomSheet.h → RNBottomSheet.h} +0 -0
@@ -13,7 +13,10 @@ Pod::Spec.new do |s|
13
13
  s.platforms = { :ios => min_ios_version_supported }
14
14
  s.source = { :git => "https://github.com/github-account/bottom-sheet.git", :tag => "#{s.version}" }
15
15
 
16
- s.source_files = "ios/BottomSheet/**/*.{h,m,mm}"
16
+ s.source_files = "ios/**/*.{h,m,mm}", "common/cpp/**/*.{cpp,h}"
17
+ s.pod_target_xcconfig = {
18
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\""
19
+ }
17
20
 
18
21
  install_modules_dependencies(s)
19
22
  end
@@ -1,58 +1,46 @@
1
-
2
- buildscript {
3
- repositories {
4
- mavenCentral()
5
- google()
6
- }
7
-
8
- dependencies {
9
- classpath "com.android.tools.build:gradle:8.7.2"
10
- }
11
- }
12
-
13
1
  apply plugin: 'com.android.library'
14
2
  apply plugin: 'com.facebook.react'
15
3
 
16
4
  def safeExtGet(prop, fallback) {
17
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
18
6
  }
19
7
 
20
8
  android {
21
9
 
22
- def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
23
- // Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6
24
- def major = agpVersion[0].toInteger()
25
- def minor = agpVersion[1].toInteger()
26
- if ((major == 7 && minor >= 3) || major >= 8) {
27
- namespace "com.reactnative.bottomsheet"
28
- buildFeatures {
29
- buildConfig true
30
- }
31
- }
32
-
33
- compileSdkVersion safeExtGet('compileSdkVersion', 35)
34
- buildToolsVersion safeExtGet('buildToolsVersion', '35.0.0')
35
-
36
- defaultConfig {
37
- minSdkVersion safeExtGet('minSdkVersion', 24)
38
- targetSdkVersion safeExtGet('targetSdkVersion', 35)
39
- }
40
-
41
- sourceSets {
42
- main {
43
- java.srcDirs += [
44
- "generated/java",
45
- "generated/jni"
46
- ]
47
- }
48
- }
10
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
11
+ // Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6
12
+ def major = agpVersion[0].toInteger()
13
+ def minor = agpVersion[1].toInteger()
14
+ if ((major == 7 && minor >= 3) || major >= 8) {
15
+ namespace "com.reactnative.bottomsheet"
16
+ buildFeatures {
17
+ buildConfig true
18
+ }
19
+ }
20
+
21
+ compileSdkVersion safeExtGet('compileSdkVersion', 35)
22
+ buildToolsVersion safeExtGet('buildToolsVersion', '35.0.0')
23
+
24
+ defaultConfig {
25
+ minSdkVersion safeExtGet('minSdkVersion', 24)
26
+ targetSdkVersion safeExtGet('targetSdkVersion', 35)
27
+ }
28
+
29
+ sourceSets {
30
+ main {
31
+ java.srcDirs += [
32
+ "generated/java",
33
+ "generated/jni"
34
+ ]
35
+ }
36
+ }
49
37
  }
50
38
 
51
39
  repositories {
52
- google()
53
- mavenCentral()
40
+ google()
41
+ mavenCentral()
54
42
  }
55
43
 
56
44
  dependencies {
57
- api 'com.facebook.react:react-native:+'
45
+ implementation 'com.facebook.react:react-native:+'
58
46
  }
@@ -87,6 +87,9 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
87
87
 
88
88
  private int contentHeight = -1;
89
89
 
90
+ /** 子 View 的布局 top,用于计算 getContentOriginOffset 的差值 (实际 top - layoutContentTop) */
91
+ private int layoutContentTop = -1;
92
+
90
93
  @Override
91
94
  protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
92
95
  if (viewDragHelper == null) {
@@ -114,10 +117,20 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
114
117
 
115
118
  getViewTreeObserver().removeOnPreDrawListener(preDrawListener);
116
119
  int top = contentView.getTop();
120
+ boolean isFirstLayout = layoutContentTop < 0;
121
+ if (layoutContentTop < 0) {
122
+ layoutContentTop = top;
123
+ }
117
124
  if (status == COLLAPSED) {
118
125
  child.offsetTopAndBottom(collapsedOffset - top);
119
126
  } else if (status == EXPANDED) {
120
- child.offsetTopAndBottom(expandedOffset - top);
127
+ if (isFirstLayout) {
128
+ // 与 iOS 一致:首次 layout 且为 expanded 时先置于 collapsed 再播放展开动画
129
+ child.offsetTopAndBottom(collapsedOffset - top);
130
+ ViewCompat.postOnAnimation(child, () -> settleToStatus(contentView, EXPANDED));
131
+ } else {
132
+ child.offsetTopAndBottom(expandedOffset - top);
133
+ }
121
134
  } else if (status == HIDDEN) {
122
135
  child.offsetTopAndBottom(getHeight() - top);
123
136
  }
@@ -530,6 +543,10 @@ public class BottomSheet extends ReactViewGroup implements NestedScrollingParent
530
543
 
531
544
  void dispatchOnSlide(int top) {
532
545
  if (contentView != null) {
546
+ if (contentView instanceof BottomSheetContentView && layoutContentTop >= 0) {
547
+ int offsetY = top - layoutContentTop;
548
+ ((BottomSheetContentView) contentView).updateContentOffset(offsetY);
549
+ }
533
550
  sentEvent(new OnSlideEvent(UIManagerHelper.getSurfaceId(reactContext), getId(), top, expandedOffset, collapsedOffset));
534
551
  }
535
552
  }
@@ -0,0 +1,39 @@
1
+ package com.reactnative.bottomsheet;
2
+
3
+ import android.content.Context;
4
+
5
+ import com.facebook.react.bridge.Arguments;
6
+ import com.facebook.react.bridge.WritableMap;
7
+ import com.facebook.react.uimanager.PixelUtil;
8
+ import com.facebook.react.uimanager.StateWrapper;
9
+ import com.facebook.react.views.view.ReactViewGroup;
10
+
11
+ /**
12
+ * Content view for BottomSheet. Implements getContentOriginOffset via state so that
13
+ * hit-testing uses the correct coordinates when the parent BottomSheet moves this view.
14
+ */
15
+ public class BottomSheetContentView extends ReactViewGroup {
16
+
17
+ @SuppressWarnings("NullableProblems")
18
+ private StateWrapper stateWrapper;
19
+
20
+ public BottomSheetContentView(Context context) {
21
+ super(context);
22
+ }
23
+
24
+ public void setStateWrapper(StateWrapper wrapper) {
25
+ this.stateWrapper = wrapper;
26
+ }
27
+
28
+ /**
29
+ * Updates Fabric state with content offset (actual top - layout top) so that
30
+ * getContentOriginOffset can correct hit-testing. Called by the parent BottomSheet.
31
+ */
32
+ public void updateContentOffset(int offsetPx) {
33
+ if (stateWrapper != null) {
34
+ WritableMap map = Arguments.createMap();
35
+ map.putDouble("contentOffset", PixelUtil.toDIPFromPixel(offsetPx));
36
+ stateWrapper.updateState(map);
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,46 @@
1
+ package com.reactnative.bottomsheet;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import androidx.annotation.Nullable;
5
+
6
+ import com.facebook.react.uimanager.ReactStylesDiffMap;
7
+ import com.facebook.react.uimanager.StateWrapper;
8
+ import com.facebook.react.uimanager.ThemedReactContext;
9
+ import com.facebook.react.uimanager.ViewGroupManager;
10
+ import com.facebook.react.uimanager.ViewManagerDelegate;
11
+ import com.facebook.react.viewmanagers.BottomSheetContentViewManagerDelegate;
12
+ import com.facebook.react.viewmanagers.BottomSheetContentViewManagerInterface;
13
+
14
+ public class BottomSheetContentViewManager extends ViewGroupManager<BottomSheetContentView>
15
+ implements BottomSheetContentViewManagerInterface<BottomSheetContentView> {
16
+
17
+ private final BottomSheetContentViewManagerDelegate<BottomSheetContentView, BottomSheetContentViewManager> mDelegate =
18
+ new BottomSheetContentViewManagerDelegate<>(this);
19
+
20
+ @Override
21
+ protected ViewManagerDelegate<BottomSheetContentView> getDelegate() {
22
+ return mDelegate;
23
+ }
24
+
25
+ @NonNull
26
+ @Override
27
+ public String getName() {
28
+ return "BottomSheetContentView";
29
+ }
30
+
31
+ @NonNull
32
+ @Override
33
+ protected BottomSheetContentView createViewInstance(@NonNull ThemedReactContext context) {
34
+ return new BottomSheetContentView(context);
35
+ }
36
+
37
+ @Nullable
38
+ @Override
39
+ public Object updateState(
40
+ @NonNull BottomSheetContentView view,
41
+ ReactStylesDiffMap props,
42
+ StateWrapper stateWrapper) {
43
+ view.setStateWrapper(stateWrapper);
44
+ return super.updateState(view, props, stateWrapper);
45
+ }
46
+ }
@@ -6,51 +6,59 @@ import com.facebook.react.common.MapBuilder;
6
6
  import com.facebook.react.uimanager.PixelUtil;
7
7
  import com.facebook.react.uimanager.ThemedReactContext;
8
8
  import com.facebook.react.uimanager.ViewGroupManager;
9
+ import com.facebook.react.uimanager.ViewManagerDelegate;
9
10
  import com.facebook.react.uimanager.annotations.ReactProp;
11
+ import com.facebook.react.viewmanagers.BottomSheetManagerDelegate;
10
12
  import com.facebook.react.viewmanagers.BottomSheetManagerInterface;
11
13
 
12
14
  import java.util.Map;
13
15
 
14
- public class BottomSheetManager extends ViewGroupManager<BottomSheet>
15
- implements BottomSheetManagerInterface<BottomSheet> {
16
-
17
- @NonNull
18
- @Override
19
- public String getName() {
20
- return "BottomSheet";
21
- }
22
-
23
- @NonNull
24
- @Override
25
- protected BottomSheet createViewInstance(@NonNull ThemedReactContext reactContext) {
26
- return new BottomSheet(reactContext);
27
- }
28
-
29
- @Override
30
- public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
31
- return MapBuilder.<String, Object>builder()
32
- .put(OnStateChangedEvent.Name, MapBuilder.of("registrationName", OnStateChangedEvent.JSEventName))
33
- .put(OnSlideEvent.Name, MapBuilder.of("registrationName", OnSlideEvent.JSEventName))
34
- .build();
35
- }
16
+ public class BottomSheetManager extends ViewGroupManager<BottomSheet> implements BottomSheetManagerInterface<BottomSheet> {
17
+
18
+ private final BottomSheetManagerDelegate<BottomSheet, BottomSheetManager> mDelegate = new BottomSheetManagerDelegate<>(this);
19
+
20
+ @Override
21
+ protected ViewManagerDelegate<BottomSheet> getDelegate() {
22
+ return mDelegate;
23
+ }
24
+
25
+ @NonNull
26
+ @Override
27
+ public String getName() {
28
+ return "BottomSheet";
29
+ }
30
+
31
+ @NonNull
32
+ @Override
33
+ protected BottomSheet createViewInstance(@NonNull ThemedReactContext reactContext) {
34
+ return new BottomSheet(reactContext);
35
+ }
36
+
37
+ @Override
38
+ public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
39
+ return MapBuilder.<String, Object>builder()
40
+ .put(OnStateChangedEvent.Name, MapBuilder.of("registrationName", OnStateChangedEvent.JSEventName))
41
+ .put(OnSlideEvent.Name, MapBuilder.of("registrationName", OnSlideEvent.JSEventName))
42
+ .build();
43
+ }
36
44
 
37
45
  @Override
38
- @ReactProp(name = "peekHeight", defaultInt = 200)
39
- public void setPeekHeight(BottomSheet view, int dp) {
40
- view.setPeekHeight((int) (PixelUtil.toPixelFromDIP(dp) + 0.5));
41
- }
46
+ @ReactProp(name = "peekHeight", defaultInt = 200)
47
+ public void setPeekHeight(BottomSheet view, int dp) {
48
+ view.setPeekHeight((int) (PixelUtil.toPixelFromDIP(dp) + 0.5));
49
+ }
42
50
 
43
51
  @Override
44
- @ReactProp(name = "status")
45
- public void setStatus(BottomSheet view, String status) {
52
+ @ReactProp(name = "status")
53
+ public void setStatus(BottomSheet view, String status) {
46
54
  assert status != null;
47
- view.setStatus(BottomSheetStatus.valueOf(status.toUpperCase()));
48
- }
55
+ view.setStatus(BottomSheetStatus.valueOf(status.toUpperCase()));
56
+ }
49
57
 
50
58
  @Override
51
- @ReactProp(name = "draggable")
52
- public void setDraggable(BottomSheet view, boolean draggable) {
53
- view.setDraggable(draggable);
54
- }
59
+ @ReactProp(name = "draggable")
60
+ public void setDraggable(BottomSheet view, boolean draggable) {
61
+ view.setDraggable(draggable);
62
+ }
55
63
 
56
64
  }
@@ -2,6 +2,7 @@ package com.reactnative.bottomsheet;
2
2
 
3
3
  import androidx.annotation.NonNull;
4
4
 
5
+ import java.util.Arrays;
5
6
  import java.util.Collections;
6
7
  import java.util.List;
7
8
 
@@ -20,6 +21,6 @@ public class BottomSheetPackage implements ReactPackage {
20
21
  @NonNull
21
22
  @Override
22
23
  public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
23
- return Collections.singletonList(new BottomSheetManager());
24
+ return Arrays.asList(new BottomSheetManager(), new BottomSheetContentViewManager());
24
25
  }
25
26
  }
@@ -0,0 +1,91 @@
1
+ cmake_minimum_required(VERSION 3.13)
2
+ set(CMAKE_VERBOSE_MAKEFILE ON)
3
+
4
+ set(LIB_LITERAL bottomsheet)
5
+ set(LIB_TARGET_NAME react_codegen_${LIB_LITERAL})
6
+
7
+ set(LIB_ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
8
+ set(LIB_COMMON_DIR ${LIB_ANDROID_DIR}/../common/cpp)
9
+ set(LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR}/build/generated/source/codegen/jni)
10
+ set(LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR}/react/renderer/components/${LIB_LITERAL})
11
+
12
+ file(GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR}/react/renderer/components/${LIB_LITERAL}/*.cpp)
13
+ file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_JNI_DIR}/*.cpp ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}/*.cpp)
14
+
15
+ add_library(
16
+ ${LIB_TARGET_NAME}
17
+ SHARED
18
+ ${LIB_CUSTOM_SRCS}
19
+ ${LIB_CODEGEN_SRCS}
20
+ )
21
+
22
+ target_include_directories(
23
+ ${LIB_TARGET_NAME}
24
+ PUBLIC
25
+ .
26
+ ${LIB_COMMON_DIR}
27
+ ${LIB_ANDROID_GENERATED_JNI_DIR}
28
+ ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}
29
+ )
30
+
31
+ if (REACTNATIVE_MERGED_SO)
32
+ target_link_libraries(
33
+ ${LIB_TARGET_NAME}
34
+ fbjni
35
+ jsi
36
+ reactnative
37
+ )
38
+ else()
39
+ target_link_libraries(
40
+ ${LIB_TARGET_NAME}
41
+ fbjni
42
+ folly_runtime
43
+ glog
44
+ jsi
45
+ react_codegen_rncore
46
+ react_debug
47
+ react_render_componentregistry
48
+ react_render_core
49
+ react_render_debug
50
+ react_render_graphics
51
+ react_render_imagemanager
52
+ react_render_mapbuffer
53
+ react_utils
54
+ react_nativemodule_core
55
+ rrc_image
56
+ turbomodulejsijni
57
+ rrc_view
58
+ yoga
59
+ )
60
+ endif()
61
+
62
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 81)
63
+ target_compile_reactnative_options(${LIB_TARGET_NAME} PUBLIC)
64
+ else()
65
+ target_compile_options(
66
+ ${LIB_TARGET_NAME}
67
+ PRIVATE
68
+ -fexceptions
69
+ -frtti
70
+ -std=c++20
71
+ -Wall
72
+ -Wpedantic
73
+ -Wno-gnu-zero-variadic-macro-arguments
74
+ )
75
+ endif()
76
+
77
+ target_compile_options(
78
+ ${LIB_TARGET_NAME}
79
+ PRIVATE
80
+ -DLOG_TAG=\"ReactNative\"
81
+ -fexceptions
82
+ -frtti
83
+ -std=c++20
84
+ -Wall
85
+ )
86
+
87
+ target_include_directories(
88
+ ${CMAKE_PROJECT_NAME}
89
+ PUBLIC
90
+ ${CMAKE_CURRENT_SOURCE_DIR}
91
+ )
@@ -0,0 +1,17 @@
1
+ #pragma once
2
+
3
+ #include <ReactCommon/JavaTurboModule.h>
4
+ #include <ReactCommon/TurboModule.h>
5
+ #include <jsi/jsi.h>
6
+ #include <react/renderer/components/bottomsheet/BottomSheetContentViewComponentDescriptor.h>
7
+
8
+ namespace facebook {
9
+ namespace react {
10
+
11
+ JSI_EXPORT
12
+ std::shared_ptr<TurboModule> bottomsheet_ModuleProvider(
13
+ const std::string &moduleName,
14
+ const JavaTurboModule::InitParams &params);
15
+
16
+ } // namespace react
17
+ } // namespace facebook
@@ -0,0 +1,5 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ export interface NativeProps extends ViewProps {
3
+ }
4
+ declare const _default: HostComponent<NativeProps>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { codegenNativeComponent } from 'react-native';
2
+ export default codegenNativeComponent('BottomSheetContentView', {
3
+ interfaceOnly: true,
4
+ });
package/dist/index.js CHANGED
@@ -1,18 +1,19 @@
1
1
  import React from 'react';
2
- import { StyleSheet, View } from 'react-native';
2
+ import { StyleSheet } from 'react-native';
3
3
  import splitLayoutProps from './splitLayoutProps';
4
4
  import BottomSheetNativeComponent from './BottomSheetNativeComponent';
5
+ import BottomSheetContentViewNativeComponent from './BottomSheetContentViewNativeComponent';
5
6
  function BottomSheet(props) {
6
7
  const { style, contentContainerStyle, children, peekHeight = 200, draggable = true, state = 'collapsed', fitToContents, ...rest } = props;
7
8
  const { outer, inner } = splitLayoutProps(StyleSheet.flatten(style));
8
9
  return (<BottomSheetNativeComponent style={[StyleSheet.absoluteFill, outer]} peekHeight={peekHeight} draggable={draggable} status={state} {...rest}>
9
- <View style={[
10
+ <BottomSheetContentViewNativeComponent style={[
10
11
  fitToContents ? styles.fitToContents : StyleSheet.absoluteFill,
11
12
  inner,
12
13
  contentContainerStyle,
13
14
  ]} collapsable={false}>
14
15
  {children}
15
- </View>
16
+ </BottomSheetContentViewNativeComponent>
16
17
  </BottomSheetNativeComponent>);
17
18
  }
18
19
  const styles = StyleSheet.create({
@@ -1,7 +1,7 @@
1
1
  import { ViewStyle } from 'react-native';
2
2
  export default function splitLayoutProps(props?: ViewStyle): {
3
3
  outer: {
4
- [key: string]: string | number | import("react-native").OpaqueColorValue | import("react-native").Animated.AnimatedNode | readonly import("react-native").BoxShadowValue[] | readonly import("react-native").FilterFunction[] | readonly import("react-native").GradientValue[] | Readonly<{
4
+ [key: string]: string | number | import("react-native").OpaqueColorValue | import("react-native").Animated.AnimatedNode | readonly import("react-native").BoxShadowValue[] | readonly import("react-native").FilterFunction[] | readonly import("react-native").BackgroundImageValue[] | readonly import("react-native").BackgroundSizeValue[] | readonly import("react-native").BackgroundPositionValue[] | readonly import("react-native").BackgroundRepeatValue[] | Readonly<{
5
5
  width: number;
6
6
  height: number;
7
7
  }> | readonly (({
@@ -202,7 +202,7 @@ export default function splitLayoutProps(props?: ViewStyle): {
202
202
  }))[] | (string | number)[] | number[] | null | undefined;
203
203
  };
204
204
  inner: {
205
- [key: string]: string | number | import("react-native").OpaqueColorValue | import("react-native").Animated.AnimatedNode | readonly import("react-native").BoxShadowValue[] | readonly import("react-native").FilterFunction[] | readonly import("react-native").GradientValue[] | Readonly<{
205
+ [key: string]: string | number | import("react-native").OpaqueColorValue | import("react-native").Animated.AnimatedNode | readonly import("react-native").BoxShadowValue[] | readonly import("react-native").FilterFunction[] | readonly import("react-native").BackgroundImageValue[] | readonly import("react-native").BackgroundSizeValue[] | readonly import("react-native").BackgroundPositionValue[] | readonly import("react-native").BackgroundRepeatValue[] | Readonly<{
206
206
  width: number;
207
207
  height: number;
208
208
  }> | readonly (({
@@ -2,6 +2,8 @@
2
2
  #import "RNBottomSheetStateChangedEvent.h"
3
3
  #import "RNBottomSheetOffsetChangedEvent.h"
4
4
 
5
+ #import "RNBottomSheetContentView.h"
6
+
5
7
  #import <react/renderer/components/bottomsheet/ComponentDescriptors.h>
6
8
  #import <react/renderer/components/bottomsheet/EventEmitters.h>
7
9
  #import <react/renderer/components/bottomsheet/Props.h>
@@ -58,6 +60,7 @@ using namespace facebook::react;
58
60
  __weak UIView *_rootView;
59
61
  BOOL _isInitialRender;
60
62
  __weak UIView *_reactRootView;
63
+ CGFloat _layoutContentTop; // 子 View 的布局 origin.y,用于 contentOffset = 实际 top - 布局 top
61
64
  }
62
65
 
63
66
  // Needed because of this: https://github.com/facebook/react-native/pull/37274
@@ -84,6 +87,7 @@ using namespace facebook::react;
84
87
  _status = BottomSheetStatus::Collapsed;
85
88
  _finalStatus = BottomSheetStatus::Collapsed;
86
89
  _isInitialRender = YES;
90
+ _layoutContentTop = NAN;
87
91
  }
88
92
  return self;
89
93
  }
@@ -228,7 +232,7 @@ using namespace facebook::react;
228
232
 
229
233
  dispatch_async(dispatch_get_main_queue(), ^{
230
234
  if (self.finalStatus == BottomSheetStatus::Expanded && self->_isInitialRender) {
231
- [self settleToStatus:self.finalStatus withFling:NO];
235
+ [self settleToStatus:self.finalStatus withFling:YES];
232
236
  }
233
237
 
234
238
  self->_isInitialRender = NO;
@@ -238,6 +242,18 @@ using namespace facebook::react;
238
242
  - (void)layoutChild {
239
243
  if (!CGRectEqualToRect(self.child.frame, CGRectZero) && !CGRectEqualToRect(self.frame, CGRectZero)) {
240
244
  [self calculateOffset];
245
+ // 仅当当前 frame.origin.y 不是“本轮要设的目标”时才视为布局结果并捕获,避免初始 collapsed + peekHeight 0 时误把已是 maxY 的 frame 当布局
246
+ if (isnan(_layoutContentTop)) {
247
+ CGFloat currentY = self.child.frame.origin.y;
248
+ CGFloat targetY = (self.status == BottomSheetStatus::Collapsed) ? self.maxY
249
+ : (self.status == BottomSheetStatus::Expanded) ? self.minY
250
+ : (CGFloat)self.frame.size.height;
251
+ if (fabs(currentY - targetY) > 0.5) {
252
+ _layoutContentTop = currentY;
253
+ } else {
254
+ _layoutContentTop = self.minY; // 无法区分时假定布局在 minY(展开位)
255
+ }
256
+ }
241
257
  if (self.status == BottomSheetStatus::Collapsed) {
242
258
  self.child.frame = CGRectOffset(self.child.frame, 0, self.maxY - self.child.frame.origin.y);
243
259
  } else if (self.status == BottomSheetStatus::Expanded) {
@@ -461,6 +477,11 @@ using namespace facebook::react;
461
477
  if (top < 0 || self.maxY == 0) {
462
478
  return;
463
479
  }
480
+ // 传的是「实际 top - 布局 top」的差值,供 getContentOriginOffset 做 hit-test 校正
481
+ if ([self.child respondsToSelector:@selector(updateContentOffset:)]) {
482
+ CGFloat offsetY = top - _layoutContentTop;
483
+ [(id)self.child updateContentOffset:offsetY];
484
+ }
464
485
 
465
486
  CGFloat progress = fmin((top - self.minY) * 1.0f / (self.maxY - self.minY), 1);
466
487
  BottomSheetEventEmitter::OnSlide payload = BottomSheetEventEmitter::OnSlide{
@@ -509,7 +530,7 @@ using namespace facebook::react;
509
530
  }
510
531
 
511
532
  - (void)stopWatchBottomSheetTransition {
512
- if(_displayLink){
533
+ if (_displayLink) {
513
534
  [_displayLink invalidate];
514
535
  _displayLink = nil;
515
536
  }
@@ -0,0 +1,12 @@
1
+ #import <React/RCTViewComponentView.h>
2
+ #import <UIKit/UIKit.h>
3
+
4
+ NS_ASSUME_NONNULL_BEGIN
5
+
6
+ @interface RNBottomSheetContentView : RCTViewComponentView
7
+
8
+ - (void)updateContentOffset:(CGFloat)contentOffset;
9
+
10
+ @end
11
+
12
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,47 @@
1
+ #import "RNBottomSheetContentView.h"
2
+
3
+ #import <react/renderer/components/bottomsheet/BottomSheetContentViewComponentDescriptor.h>
4
+ #import <react/renderer/components/bottomsheet/BottomSheetContentViewShadowNode.h>
5
+ #import <react/renderer/components/bottomsheet/EventEmitters.h>
6
+ #import <react/renderer/components/bottomsheet/Props.h>
7
+ #import <react/renderer/components/bottomsheet/RCTComponentViewHelpers.h>
8
+
9
+ using namespace facebook::react;
10
+
11
+ @implementation RNBottomSheetContentView {
12
+ std::shared_ptr<const BottomSheetContentViewShadowNode::ConcreteState> _state;
13
+ }
14
+
15
+ + (void)load {
16
+ [super load];
17
+ }
18
+
19
+ + (ComponentDescriptorProvider)componentDescriptorProvider {
20
+ return concreteComponentDescriptorProvider<BottomSheetContentViewComponentDescriptor>();
21
+ }
22
+
23
+ - (instancetype)initWithFrame:(CGRect)frame {
24
+ if (self = [super initWithFrame:frame]) {
25
+ static const auto defaultProps = std::make_shared<const BottomSheetContentViewProps>();
26
+ _props = defaultProps;
27
+ }
28
+ return self;
29
+ }
30
+
31
+ - (void)updateState:(const facebook::react::State::Shared &)state oldState:(const facebook::react::State::Shared &)oldState {
32
+ _state = std::static_pointer_cast<const BottomSheetContentViewShadowNode::ConcreteState>(state);
33
+ }
34
+
35
+ - (void)updateContentOffset:(CGFloat)contentOffset {
36
+ if (!_state) {
37
+ return;
38
+ }
39
+ _state->updateState(
40
+ [contentOffset](const BottomSheetContentViewShadowNode::ConcreteState::Data &oldData) -> BottomSheetContentViewShadowNode::ConcreteState::SharedData {
41
+ auto newData = oldData;
42
+ newData.contentOffset = static_cast<double>(contentOffset);
43
+ return std::make_shared<BottomSheetContentViewShadowNode::ConcreteState::Data>(newData);
44
+ });
45
+ }
46
+
47
+ @end
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@sdcx/bottom-sheet",
3
3
  "description": "A react-native BottomSheet component.",
4
- "version": "1.0.3",
5
- "main": "./dist/index.js",
6
- "typings": "./dist/index.d.ts",
4
+ "version": "1.0.6",
5
+ "main": "./dist/index",
6
+ "module": "./dist/index",
7
+ "types": "./dist/index.d.ts",
7
8
  "react-native": "src/index",
9
+ "source": "src/index",
8
10
  "nativePackage": true,
9
11
  "files": [
10
12
  "src",
@@ -17,8 +19,8 @@
17
19
  "!ios/build",
18
20
  "!**/__tests__"
19
21
  ],
20
- "repository": "https://github.com/sdcxtech/react-native-troika",
21
- "homepage": "https://github.com/sdcxtech/react-native-troika/tree/master/packages/bottom-sheet/README.md",
22
+ "repository": "https://github.com/listenzz/react-native-troika",
23
+ "homepage": "https://github.com/listenzz/react-native-troika/tree/master/packages/bottom-sheet/README.md",
22
24
  "author": "sdcx",
23
25
  "license": "MIT",
24
26
  "keywords": [
@@ -46,7 +48,8 @@
46
48
  },
47
49
  "ios": {
48
50
  "componentProvider": {
49
- "BottomSheet": "RNBottomSheet"
51
+ "BottomSheet": "RNBottomSheet",
52
+ "BottomSheetContentView": "RNBottomSheetContentView"
50
53
  }
51
54
  }
52
55
  }
@@ -3,7 +3,8 @@ module.exports = {
3
3
  platforms: {
4
4
  android: {
5
5
  libraryName: 'bottomsheet',
6
- componentDescriptors: ['BottomSheetComponentDescriptor'],
6
+ componentDescriptors: ['BottomSheetContentViewComponentDescriptor'],
7
+ cmakeListsPath: 'src/main/jni/CMakeLists.txt',
7
8
  },
8
9
  },
9
10
  },
@@ -0,0 +1,8 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import { codegenNativeComponent } from 'react-native';
3
+
4
+ export interface NativeProps extends ViewProps {}
5
+
6
+ export default codegenNativeComponent<NativeProps>('BottomSheetContentView', {
7
+ interfaceOnly: true,
8
+ }) as HostComponent<NativeProps>;
package/src/index.tsx CHANGED
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { NativeSyntheticEvent, StyleSheet, View, ViewProps } from 'react-native';
2
+ import { NativeSyntheticEvent, StyleSheet, ViewProps } from 'react-native';
3
3
  import splitLayoutProps from './splitLayoutProps';
4
4
  import BottomSheetNativeComponent from './BottomSheetNativeComponent';
5
+ import BottomSheetContentViewNativeComponent from './BottomSheetContentViewNativeComponent';
5
6
  import type { OnStateChangedEventPayload, OnSlideEventPayload } from './BottomSheetNativeComponent';
6
7
 
7
8
  export type BottomSheetState = 'collapsed' | 'expanded' | 'hidden';
@@ -38,7 +39,7 @@ function BottomSheet(props: BottomSheetProps) {
38
39
  status={state}
39
40
  {...rest}
40
41
  >
41
- <View
42
+ <BottomSheetContentViewNativeComponent
42
43
  style={[
43
44
  fitToContents ? styles.fitToContents : StyleSheet.absoluteFill,
44
45
  inner,
@@ -47,7 +48,7 @@ function BottomSheet(props: BottomSheetProps) {
47
48
  collapsable={false}
48
49
  >
49
50
  {children}
50
- </View>
51
+ </BottomSheetContentViewNativeComponent>
51
52
  </BottomSheetNativeComponent>
52
53
  );
53
54
  }
@@ -1,283 +0,0 @@
1
- // !$*UTF8*$!
2
- {
3
- archiveVersion = 1;
4
- classes = {
5
- };
6
- objectVersion = 48;
7
- objects = {
8
-
9
- /* Begin PBXBuildFile section */
10
- 91C884A6202C3E8600EC0A20 /* undefined.m in Sources */ = {isa = PBXBuildFile; fileRef = 91C884A1202C3E8600EC0A20 /* undefined.m */; };
11
- /* End PBXBuildFile section */
12
-
13
- /* Begin PBXCopyFilesBuildPhase section */
14
- 910362D01FE9318600F4DA8E /* CopyFiles */ = {
15
- isa = PBXCopyFilesBuildPhase;
16
- buildActionMask = 2147483647;
17
- dstPath = "include/$(PRODUCT_NAME)";
18
- dstSubfolderSpec = 16;
19
- files = (
20
- );
21
- runOnlyForDeploymentPostprocessing = 0;
22
- };
23
- /* End PBXCopyFilesBuildPhase section */
24
-
25
- /* Begin PBXFileReference section */
26
- 910362D21FE9318600F4DA8E /* libBottomSheet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBottomSheet.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
- 91C884A1202C3E8600EC0A20 /* undefined.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = undefined.m; sourceTree = "<group>"; };
28
- 91C884A2202C3E8600EC0A20 /* undefined.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = undefined.h; sourceTree = "<group>"; };
29
- /* End PBXFileReference section */
30
-
31
- /* Begin PBXFrameworksBuildPhase section */
32
- 910362CF1FE9318600F4DA8E /* Frameworks */ = {
33
- isa = PBXFrameworksBuildPhase;
34
- buildActionMask = 2147483647;
35
- files = (
36
- );
37
- runOnlyForDeploymentPostprocessing = 0;
38
- };
39
- /* End PBXFrameworksBuildPhase section */
40
-
41
- /* Begin PBXGroup section */
42
- 910362C91FE9318600F4DA8E = {
43
- isa = PBXGroup;
44
- children = (
45
- 910362D41FE9318600F4DA8E /* BottomSheet */,
46
- 910362D31FE9318600F4DA8E /* Products */,
47
- );
48
- sourceTree = "<group>";
49
- };
50
- 910362D31FE9318600F4DA8E /* Products */ = {
51
- isa = PBXGroup;
52
- children = (
53
- 910362D21FE9318600F4DA8E /* libBottomSheet.a */,
54
- );
55
- name = Products;
56
- sourceTree = "<group>";
57
- };
58
- 910362D41FE9318600F4DA8E /* BottomSheet */ = {
59
- isa = PBXGroup;
60
- children = (
61
- 91C884A2202C3E8600EC0A20 /* undefined.h */,
62
- 91C884A1202C3E8600EC0A20 /* undefined.m */,
63
- );
64
- path = BottomSheet;
65
- sourceTree = "<group>";
66
- };
67
- /* End PBXGroup section */
68
-
69
- /* Begin PBXNativeTarget section */
70
- 910362D11FE9318600F4DA8E /* BottomSheet */ = {
71
- isa = PBXNativeTarget;
72
- buildConfigurationList = 910362DB1FE9318600F4DA8E /* Build configuration list for PBXNativeTarget "BottomSheet" */;
73
- buildPhases = (
74
- 910362CE1FE9318600F4DA8E /* Sources */,
75
- 910362CF1FE9318600F4DA8E /* Frameworks */,
76
- 910362D01FE9318600F4DA8E /* CopyFiles */,
77
- );
78
- buildRules = (
79
- );
80
- dependencies = (
81
- );
82
- name = BottomSheet;
83
- productName = BottomSheet;
84
- productReference = 910362D21FE9318600F4DA8E /* libBottomSheet.a */;
85
- productType = "com.apple.product-type.library.static";
86
- };
87
- /* End PBXNativeTarget section */
88
-
89
- /* Begin PBXProject section */
90
- 910362CA1FE9318600F4DA8E /* Project object */ = {
91
- isa = PBXProject;
92
- attributes = {
93
- LastUpgradeCheck = 0920;
94
- ORGANIZATIONNAME = Listen;
95
- TargetAttributes = {
96
- 910362D11FE9318600F4DA8E = {
97
- CreatedOnToolsVersion = 9.2;
98
- ProvisioningStyle = Automatic;
99
- };
100
- };
101
- };
102
- buildConfigurationList = 910362CD1FE9318600F4DA8E /* Build configuration list for PBXProject "BottomSheet" */;
103
- compatibilityVersion = "Xcode 8.0";
104
- developmentRegion = en;
105
- hasScannedForEncodings = 0;
106
- knownRegions = (
107
- en,
108
- );
109
- mainGroup = 910362C91FE9318600F4DA8E;
110
- productRefGroup = 910362D31FE9318600F4DA8E /* Products */;
111
- projectDirPath = "";
112
- projectRoot = "";
113
- targets = (
114
- 910362D11FE9318600F4DA8E /* BottomSheet */,
115
- );
116
- };
117
- /* End PBXProject section */
118
-
119
- /* Begin PBXSourcesBuildPhase section */
120
- 910362CE1FE9318600F4DA8E /* Sources */ = {
121
- isa = PBXSourcesBuildPhase;
122
- buildActionMask = 2147483647;
123
- files = (
124
- 91C884A6202C3E8600EC0A20 /* undefined.m in Sources */,
125
- );
126
- runOnlyForDeploymentPostprocessing = 0;
127
- };
128
- /* End PBXSourcesBuildPhase section */
129
-
130
- /* Begin XCBuildConfiguration section */
131
- 910362D91FE9318600F4DA8E /* Debug */ = {
132
- isa = XCBuildConfiguration;
133
- buildSettings = {
134
- ALWAYS_SEARCH_USER_PATHS = NO;
135
- CLANG_ANALYZER_NONNULL = YES;
136
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
137
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
138
- CLANG_CXX_LIBRARY = "libc++";
139
- CLANG_ENABLE_MODULES = YES;
140
- CLANG_ENABLE_OBJC_ARC = YES;
141
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
142
- CLANG_WARN_BOOL_CONVERSION = YES;
143
- CLANG_WARN_COMMA = YES;
144
- CLANG_WARN_CONSTANT_CONVERSION = YES;
145
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
146
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
147
- CLANG_WARN_EMPTY_BODY = YES;
148
- CLANG_WARN_ENUM_CONVERSION = YES;
149
- CLANG_WARN_INFINITE_RECURSION = YES;
150
- CLANG_WARN_INT_CONVERSION = YES;
151
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
152
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
153
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
154
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
155
- CLANG_WARN_STRICT_PROTOTYPES = YES;
156
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
157
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
158
- CLANG_WARN_UNREACHABLE_CODE = YES;
159
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
160
- CODE_SIGN_IDENTITY = "iPhone Developer";
161
- COPY_PHASE_STRIP = NO;
162
- DEBUG_INFORMATION_FORMAT = dwarf;
163
- ENABLE_STRICT_OBJC_MSGSEND = YES;
164
- ENABLE_TESTABILITY = YES;
165
- GCC_C_LANGUAGE_STANDARD = gnu11;
166
- GCC_DYNAMIC_NO_PIC = NO;
167
- GCC_NO_COMMON_BLOCKS = YES;
168
- GCC_OPTIMIZATION_LEVEL = 0;
169
- GCC_PREPROCESSOR_DEFINITIONS = (
170
- "DEBUG=1",
171
- "$(inherited)",
172
- );
173
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
174
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
175
- GCC_WARN_UNDECLARED_SELECTOR = YES;
176
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
177
- GCC_WARN_UNUSED_FUNCTION = YES;
178
- GCC_WARN_UNUSED_VARIABLE = YES;
179
- IPHONEOS_DEPLOYMENT_TARGET = 7.0;
180
- MTL_ENABLE_DEBUG_INFO = YES;
181
- ONLY_ACTIVE_ARCH = YES;
182
- SDKROOT = iphoneos;
183
- };
184
- name = Debug;
185
- };
186
- 910362DA1FE9318600F4DA8E /* Release */ = {
187
- isa = XCBuildConfiguration;
188
- buildSettings = {
189
- ALWAYS_SEARCH_USER_PATHS = NO;
190
- CLANG_ANALYZER_NONNULL = YES;
191
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
192
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
193
- CLANG_CXX_LIBRARY = "libc++";
194
- CLANG_ENABLE_MODULES = YES;
195
- CLANG_ENABLE_OBJC_ARC = YES;
196
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
197
- CLANG_WARN_BOOL_CONVERSION = YES;
198
- CLANG_WARN_COMMA = YES;
199
- CLANG_WARN_CONSTANT_CONVERSION = YES;
200
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
201
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
202
- CLANG_WARN_EMPTY_BODY = YES;
203
- CLANG_WARN_ENUM_CONVERSION = YES;
204
- CLANG_WARN_INFINITE_RECURSION = YES;
205
- CLANG_WARN_INT_CONVERSION = YES;
206
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
207
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
208
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
209
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
210
- CLANG_WARN_STRICT_PROTOTYPES = YES;
211
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
212
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
213
- CLANG_WARN_UNREACHABLE_CODE = YES;
214
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
215
- CODE_SIGN_IDENTITY = "iPhone Developer";
216
- COPY_PHASE_STRIP = NO;
217
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
218
- ENABLE_NS_ASSERTIONS = NO;
219
- ENABLE_STRICT_OBJC_MSGSEND = YES;
220
- GCC_C_LANGUAGE_STANDARD = gnu11;
221
- GCC_NO_COMMON_BLOCKS = YES;
222
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
223
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
224
- GCC_WARN_UNDECLARED_SELECTOR = YES;
225
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
226
- GCC_WARN_UNUSED_FUNCTION = YES;
227
- GCC_WARN_UNUSED_VARIABLE = YES;
228
- IPHONEOS_DEPLOYMENT_TARGET = 7.0;
229
- MTL_ENABLE_DEBUG_INFO = NO;
230
- SDKROOT = iphoneos;
231
- VALIDATE_PRODUCT = YES;
232
- };
233
- name = Release;
234
- };
235
- 910362DC1FE9318600F4DA8E /* Debug */ = {
236
- isa = XCBuildConfiguration;
237
- buildSettings = {
238
- CODE_SIGN_STYLE = Automatic;
239
- DEVELOPMENT_TEAM = 9H9696K6NL;
240
- OTHER_LDFLAGS = "-ObjC";
241
- PRODUCT_NAME = "$(TARGET_NAME)";
242
- SKIP_INSTALL = YES;
243
- TARGETED_DEVICE_FAMILY = "1,2";
244
- };
245
- name = Debug;
246
- };
247
- 910362DD1FE9318600F4DA8E /* Release */ = {
248
- isa = XCBuildConfiguration;
249
- buildSettings = {
250
- CODE_SIGN_STYLE = Automatic;
251
- DEVELOPMENT_TEAM = 9H9696K6NL;
252
- OTHER_LDFLAGS = "-ObjC";
253
- PRODUCT_NAME = "$(TARGET_NAME)";
254
- SKIP_INSTALL = YES;
255
- TARGETED_DEVICE_FAMILY = "1,2";
256
- };
257
- name = Release;
258
- };
259
- /* End XCBuildConfiguration section */
260
-
261
- /* Begin XCConfigurationList section */
262
- 910362CD1FE9318600F4DA8E /* Build configuration list for PBXProject "BottomSheet" */ = {
263
- isa = XCConfigurationList;
264
- buildConfigurations = (
265
- 910362D91FE9318600F4DA8E /* Debug */,
266
- 910362DA1FE9318600F4DA8E /* Release */,
267
- );
268
- defaultConfigurationIsVisible = 0;
269
- defaultConfigurationName = Release;
270
- };
271
- 910362DB1FE9318600F4DA8E /* Build configuration list for PBXNativeTarget "BottomSheet" */ = {
272
- isa = XCConfigurationList;
273
- buildConfigurations = (
274
- 910362DC1FE9318600F4DA8E /* Debug */,
275
- 910362DD1FE9318600F4DA8E /* Release */,
276
- );
277
- defaultConfigurationIsVisible = 0;
278
- defaultConfigurationName = Release;
279
- };
280
- /* End XCConfigurationList section */
281
- };
282
- rootObject = 910362CA1FE9318600F4DA8E /* Project object */;
283
- }