Custom Layouts: A Worked Example Creating a custom collection view layout is simple with straightforward requirements, but the implementation details of the process may vary. Your layout must produce layout attributes objects for every view your coll…
Next About iOS Collection Views 关于iOS Collection Views A collection view is a way to present an ordered set of data items using a flexible and changeable layout. The most common use for collection views is to present items in a grid-like arrangement,…
  Incorporating Gesture Support 结合手势支持 You can add greater interactivity to your collection views through the use of gesture recognizers. Like any view, you can add a gesture recognizer to a collection view and use it to trigger actions when those ge…
Creating Custom Layouts 创建自定义布局 Before you start building custom layouts, consider whether doing so is really necessary. The UICollectionViewFlowLayout class provides a significant amount of behavior that has already been optimized for efficiency and…
  Collection View Basics Collection View 基础 To present its content onscreen, a collection view cooperates with many different objects. Some objects are custom and must be provided by your app. For example, your app must provide a data source object t…
  Designing Your Data Source and Delegate 设计你的数据源和委托 Every collection view must have a data source object providing it with content to display. The data source object is an object that your app provides. It could be an object from your app’s data mod…
  Using the Flow Layout使用流布局 The UICollectionViewFlowLayout class is a concrete layout object that you can use to arrange items in your collection views. The flow layout implements a line-based breaking layout, which means that the layout object plac…
Views Because view objects are the main way your application interacts with the user, they have many responsibilities. Here are just a few: 因为视图对象是应用程序跟用户交互的主要方式,所以它们有很多责任.以下是其中一小部分: Layout and subview management 布局和子视图管理 A view defines its own defau…
原文:View Programming Guide for iOS View and Window Architecture Views and windows present your application’s user interface and handle the interactions with that interface. UIKit and other system frameworks provide a number of views that you can use a…
原文:View Programming Guide for iOS 1 Introduction 先熟悉一下基本概念. Window Windows do not have any visible content themselves but provide a basic container for your application's views. Every application has at least one window that displays the application'…