常见开发中都会有这样的底部弹窗
购买卡片底部弹窗
其UI框架为scrollview->contentView(UIView)->(tableview)
UI框架
当tableview内容很多时候需要可以上下滑动,但是最外边的scrollview高度是不变的。
当我想要隐藏这个视图时候下拉会隐藏消失(此时拉动的是scrollview,而不是tableview);
上代码
UIScrollView *scrollView = [[UIScrollView alloc]init];
self.scrollView = scrollView;
scrollView.delegate = self;
scrollView.backgroundColor = [UIColor clearColor];
scrollView.layer.cornerRadius = 10;
scrollView.showsVerticalScrollIndicator = NO;
scrollView.showsHorizontalScrollIndicator = NO;
scrollView.scrollEnabled = YES;
if (@available(iOS 11.0, *)) {
scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else { <