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…
  Animations Animations provide fluid visual transitions between different states of your user interface. In iOS, animations are used extensively to reposition views, change their size, remove them from view hierarchies, and hide them. You might use…
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 as-is with little or no mod…
Navigating a Data Hierarchy with Table Views 导航数据表视图层次 A common use of table views—and one to which they’re ideally suited—is to navigate hierarchies of data. A table view at a top level of the hierarchy lists categories of data at the most general l…
Windows Every iOS application needs at least one window—an instance of the UIWindow class—and some may include more than one window. A window object has several responsibilities: 每个iOS应用程序需要至少一个窗口---UIWindow类的一个实例---有些可能有不止一个窗口.窗口对象的任务是: It contains…
Next About Windows and Views 关于窗口和视图 In iOS, you use windows and views to present your application’s content on the screen. Windows do not have any visible content themselves but provide a basic container for your application’s views. Views define a…
The frame property contains the frame rectangle, which specifies the size and location of the view in its superview’s coordinate system. frame是指定父视图的位置和大小的 The bounds property contains the bounds rectangle, which specifies the size of the view (and i…
frame—Use this to animate position and size changes for the view.  ,框架,可以视图动态改变大小和位置 bounds—Use this to animate changes to the size of the view.      ,可以改变视图的大小 center—Use this to animate the position of the view.           ,可以改变视图的位置 transform—Use t…
https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html#//apple_ref/doc/uid/TP40009503-CH2-SW42…
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,…
原文: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'…
Creating and Configuring a Table View Your app must present a table view to users before it can manage it in response to taps on rows and other actions. This chapter shows what you must do to create a table view, configure it, and populate it with da…
About Table Views in iOS Apps Table views are versatile user interface objects frequently found in iOS apps. A table view presents data in a scrollable list of multiple rows that may be divided into sections. 表格视图是通用用户界面对象,常常能在iOS应用程序里看到. 表格视图在一个多行的一…
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…
  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…
基本概念: 加速计: 又称加速度计,测量设备运动的加速度. 加速度: 矢量,描绘速度的方向和大小变化的快慢. 陀螺仪: 感测与维持方向的装置. 原文: Motion Event声明: 由于本人水平有限,翻译定有不当甚至错误之处,如有发现还望指出. 当用户移动,摇晃,或倾斜设备时,产生motion事件.这些motion事件被设备硬件检测到,就是加速计和陀螺仪. acclerometer事实上是由3个加速计组成,X,Y,Z坐标轴各有一个.每一个测量随着时间的推移以线性的速度变化.结合这三个加速计可以…
Managing Selections 管理选择 When users tap a row of a table view, usually something happens as a result. Another table view could slide into place, the row could display a checkmark, or some other action could be performed. The following sections descri…
A Closer Look at Table View Cells A table view uses cell objects to draw its visible rows and then caches those objects as long as the rows are visible. Cells inherit from the UITableViewCell class. The table view’s data source provides the cell obje…
Overview of the Table View API 表格视图API概述 The table view programming interface includes several UIKit classes, two formal protocols, and a category added to a Foundation framework class. 表格视图编程接口包括好几个UIKit类,两个正式的协议以及添加到Foundation 框架类的一个类别(category). T…
Table View Styles and Accessory Views 表格视图的风格以及辅助视图 Table views come in distinctive styles that are suitable for specific purposes. In addition, the UIKit framework provides standard styles for the cells used to draw the rows of table views. It also…
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…
  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…
  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…
  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…
关于Window的定义的要点 Windows do not have any visible content themselves but provide a basic container for your application’s views.…
View Controller Basics Apps running on iOS–based devices have a limited amount of screen space for displaying content and therefore must be creative in how they present information to the user. Apps that have lots of information to display must there…
Resizing the View Controller’s Views A view controller owns its own view and manages the view’s contents. In the process, the view controller also manages the view’s subviews. But in most cases, the view’s frame is not set directly by the view contro…
About View Controllers View controllers are a vital link between an app’s data and its visual appearance. Whenever an iOS app displays a user interface, the displayed content is managed by a view controller or a group of view controllers coordinating…
iOS 7 UI Transition Guide Preparing for Transition Before You Start Scoping the Project Supporting iOS 6 Updating the UI Appearance and Behavior Bars and Bar Buttons Content Views Controls Temporary Views Supporting iOS 6 If business reasons require…