UIScrollView Class Reference
来源:互联网 发布:js 断点续传 编辑:程序博客网 时间:2024/06/03 04:03
UIScrollView是一个很强大的类,它能提供比手机界面更大的空间给用户查看。如一张很大的图片,用户即可在手机上移动和捏合查看图片。
UIScrollView向下延生了三个子类UICollectionView、UITableView和UITextView。这都是我们工作中常用的View。
1 Managing the Display of Content
// 动态设置原点,即移动public func setContentOffset(_ contentOffset: CGPoint, animated animated: Bool)// 原点所对应的contentview的坐标public var contentOffset: CGPoint// 可移动的区域public var contentSize: CGSize// contentview和边的距离public var contentInset: UIEdgeInsets
2 Managing Scrolling
// 能否滚动public var scrollEnabled: Bool// 锁定某个方向的滚动public var directionalLockEnabled: Bool// 能否自动回到顶部public var scrollsToTop: Bool// 可视区域public func scrollRectToVisible(rect: CGRect, animated: Bool)// 以页的形式滚动public var pagingEnabled: Bool// 全局滚动阻力public var bounces: Bool // y轴滚动阻力public var alwaysBounceVertical: Bool// x轴滚动阻力public var alwaysBounceHorizontal: Bool// 手势事件是否响应public func touchesShouldBegin(touches: Set<UITouch>, withEvent event: UIEvent?, inContentView view: UIView) -> Bool// 是否取消子视图public func touchesShouldCancelInContentView(view: UIView) -> Bool// 是否延迟处理触摸事件public var delaysContentTouches: Bool// 是否触摸导致跟踪public var canCancelContentTouches: Bool// 滚动的速度public var decelerationRate: CGFloat// 用户是否触摸屏幕public var tracking: Bool { get } // 是否在滚动public var dragging: Bool { get }// 是否在减速动画public var decelerating: Bool { get }
3 Managing the Scroll Indicator
// 滚动条的样式public var indicatorStyle: UIScrollViewIndicatorStyle// 滚动条的位置public var scrollIndicatorInsets: UIEdgeInsets// 是否显示x轴滚动条public var showsHorizontalScrollIndicator: Bool// 是否显示y轴滚动条public var showsVerticalScrollIndicator: Bool// 随时显示滚动条public func flashScrollIndicators()
4 Zooming and Panning
// UIPanGestureRecognizer手势@available(iOS 5.0, *)public var panGestureRecognizer: UIPanGestureRecognizer { get }// UIPinchGestureRecognizer手势@available(iOS 5.0, *)public var pinchGestureRecognizer: UIPinchGestureRecognizer? { get }// 是否缩放动画@available(iOS 3.0, *)public func zoomToRect(rect: CGRect, animated: Bool)// 缩放比例@available(iOS 3.0, *)public var zoomScale: CGFloat// 动画设置缩放比例@available(iOS 3.0, *)public func setZoomScale(scale: CGFloat, animated: Bool)// 缩放的最小比例public var minimumZoomScale: CGFloat// 缩放的最大比例public var maximumZoomScale: CGFloat //缩放阻力效果public var bouncesZoom: Bool // 用户是否在进行缩放操作public var zooming: Bool { get }// 是否超过缩放指定的比例限制public var zoomBouncing: Bool { get }
5 Managing the Delegate
// 回调代理weak public var delegate: UIScrollViewDelegate?
6 Managing the Keyboard
// 键盘与滚动交互@available(iOS 7.0, *)public var keyboardDismissMode: UIScrollViewKeyboardDismissMode
Appendix
Related Documentation
UIScrollView Class Reference
Revision History
Copyright
CSDN:http://blog.csdn.net/y550918116j
GitHub:https://github.com/937447974
0 0
- UIScrollView Class Reference
- QProcess Class Reference
- UITableView Class Reference
- CCTransitionScene Class Reference
- UIPageControl Class Reference翻译
- Hierarchical_State_Machine Class Reference
- UIViewController Class Reference
- QTableModel Class Reference
- QwtSplineCurveFitter Class Reference
- UITabBarController Class Reference
- wxAppConsole Class Reference
- UIViewController Class Reference
- QPrinter Class Reference
- QWebView Class Reference
- QNetworkProxy Class Reference
- CBATTRequest Class Reference
- CBCentral Class Reference
- CBCentralManager Class Reference
- web端测试和移动端测试的区别
- Cpp环境【POJ3320】Jessica's Reading Problem 洁西卡的复习计划
- tjut 4968
- 根据年份和月份打印当月日历
- android获取内置和外置SD卡路径
- UIScrollView Class Reference
- CUICatalog: Invalid asset name supplied:
- Ubuntu 安装Oracle JDK
- Android 自定义Actionbar 出错解决办法 及 Theme常用属性
- 如何导入svn上的maven项目到eclipse中
- setTextColor方法不能用R.Color.XXX设置颜色的解决方法
- heartbeat安装
- 操作系统整理
- dede常见标签