Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如jjv360在我的另一个问题中所建议的那样,为 scrollView 自定义分页宽度的一种方法是使 scrollView 成为分页的大小,然后在其上覆盖一个透明的 UIView 并为 [overlayView addGestureRecognizer:scrollView.panGestureRecognizer]触摸事件。
这听起来是个好主意,这是我的快速问题:
只是叠加[view addsubview OLvier]吗?什么是视图覆盖方法?
[view addsubview OLvier]
是的...使用 CGRectMake 设置视图框架并使用覆盖
[滚动视图添加子视图:view1]
UIView *yourView = [UIView alloc]init]; yourView.frame = CGRectMake(x,y,width,height)//whatever values work for you [self.view addSubview: yourView];