@@ -21,6 +21,8 @@ @interface MCFeatureLayerDetailsViewController ()
2121@property (strong , nonatomic ) MCFieldWithTitleCell *layerNameCell;
2222@property (strong , nonatomic ) MCButtonCell *buttonCell;
2323@property (strong , nonatomic ) MCDescriptionCell *descriptionCell;
24+ @property (nonatomic ) BOOL haveScrolled;
25+ @property (nonatomic ) CGFloat contentOffset;
2426@end
2527
2628@implementation MCFeatureLayerDetailsViewController
@@ -52,7 +54,15 @@ - (void)viewDidLoad {
5254 self.tableView .estimatedRowHeight = 100 ;
5355 self.tableView .rowHeight = UITableViewAutomaticDimension;
5456 self.tableView .separatorStyle = UIAccessibilityTraitNone;
57+
58+ UIEdgeInsets tabBarInsets = UIEdgeInsetsMake (0 , 0 , self.tabBarController .tabBar .frame .size .height , 0 );
59+ self.tableView .contentInset = tabBarInsets;
60+ self.tableView .scrollIndicatorInsets = tabBarInsets;
61+ self.contentOffset = 0 ;
62+ self.haveScrolled = NO ;
63+
5564 [self .view addSubview: self .tableView];
65+ [self addDragHandle ];
5666 [self addCloseButton ];
5767
5868 [[MCMetrics shared ] featureLayerDetails ];
@@ -157,11 +167,42 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField {
157167 return YES ;
158168}
159169
160-
170+ # pragma mark - NGADrawerView methods
161171- (void ) closeDrawer {
162172 [self .drawerViewDelegate popDrawer ];
163173}
164174
175+ - (void ) drawerWasCollapsed {
176+ [super drawerWasCollapsed ];
177+ [self .tableView setScrollEnabled: NO ];
178+ }
179+
180+
181+ - (void ) drawerWasMadeFull {
182+ [super drawerWasMadeFull ];
183+ [self .tableView setScrollEnabled: YES ];
184+ }
185+
186+ // Override this method to make the drawer and the scrollview play nice
187+ - (void )scrollViewDidScroll : (UIScrollView *)scrollView {
188+ if (self.haveScrolled ) {
189+ [self rollUpPanGesture: scrollView.panGestureRecognizer withScrollView: scrollView];
190+ }
191+ }
192+
193+ // If the table view is scrolling rollup the gesture to the drawer and handle accordingly.
194+ - (void )scrollViewWillBeginDragging : (UIScrollView *)scrollView {
195+ self.haveScrolled = YES ;
196+
197+ if (!self.isFullView ) {
198+ scrollView.scrollEnabled = NO ;
199+ scrollView.scrollEnabled = YES ;
200+ } else {
201+ scrollView.scrollEnabled = YES ;
202+ }
203+ }
204+
205+
165206
166207
167208#pragma mark - GPKGSButtonCellDelegate
0 commit comments