react-native-true-sheet/ios/TrueSheetContentView.h
Jovanni Lo 2587c45a52
fix: fix android scrollable content (#236)
* fix(ios): pin scrollview to closest top sibling when no header

* chore: update example

* docs: update README

* fix: fix TrueSheet style to fix android scrollable

* refactor: rename fitScrollView to scrollable

* refactor(android): cleanup code, update example
2025-11-27 21:19:28 +08:00

46 lines
1.1 KiB
Objective-C

//
// Created by Jovanni Lo (@lodev09)
// Copyright (c) 2024-present. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
//
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTSurfaceTouchHandler.h>
#import <React/RCTViewComponentView.h>
#import <UIKit/UIKit.h>
#import <react/renderer/core/LayoutMetrics.h>
@class TrueSheetViewController;
@class RCTScrollViewComponentView;
NS_ASSUME_NONNULL_BEGIN
@protocol TrueSheetContentViewDelegate <NSObject>
- (void)contentViewDidChangeSize:(CGSize)newSize;
- (void)contentViewDidChangeChildren;
@end
@interface TrueSheetContentView : RCTViewComponentView
@property (nonatomic, weak, nullable) id<TrueSheetContentViewDelegate> delegate;
- (RCTScrollViewComponentView *_Nullable)findScrollView:(UIView *_Nullable *_Nullable)outTopSibling;
/**
* Setup ScrollView pinning
* @param pinned Whether to pin the scroll view
* @param headerView Optional header view to pin below (can be nil)
*/
- (void)setupScrollViewPinning:(BOOL)pinned withHeaderView:(nullable UIView *)headerView;
@end
NS_ASSUME_NONNULL_END
#endif