1. Views A view (an object whose class is UIView or a subclass of UIView) knows how to draw itself into a rectangular area of the interface. Your app has a visible interface thanks to views. (eg: you can drag an interface widget, such as a UIButton,…
iOS Programming Views :Redrawing and UIScrollView  1.1 event  You are going to see how views are redrawn in response to an event. 你将看到view如何响应event的. You declared properties in header files. You can also declare properties in class extensions. 你可以声明属…
iOS Programming  View and View Hierarchy 视图和视图等级 1.1(1)File → New → Project.. From the iOS section, select Application, choose the Empty Application template, and click Next. 1.2 View Basics  (1)A view is an instance of UIView or one of its subclasse…
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,…
iOS Programming View Controllers  视图控制器  1.1  A view controller is an instance of a subclass of UIViewController. 一个view controller 是一个UIViewController的子类. A view controller manages a view hierarchy. 一个view controller 管理一个视图树. It is responsible for c…
一 视图 二 绘制 三 手势 00:31 UIGestureRecognizer 抽象类 两步 1添加识别器(控制器或者视图来完成) 2手势识别后要做的事情 UIPanGestureRecognizer 提供三个方法: -(CGPoint)translationInView:(UIView *)aView; --触摸移动距离 -(CGPoint)velocityInView:(UIView *)aView; --触摸移动速度 -(void)setTranslation:(CGPiont)tran…
有时候需要在Scene视图中绘制一些辅助线,方便进行一些编辑的工作,可以通过如下类和函数完成: 绘制辅助线,相关类: Gizmos类:用于在Scene视图中绘制调试信息或辅助线,这些辅助线只有在Scene中能看到,Game视图中看不到. Handles类:绘制各种东西,可以绘制一些3D gizmo.2D GUI.进行坐标系统转换等. 相关函数(MonoBehaviour类): OnDrawGizmos:每帧调用,所绘gizmos可用于对对应物体拾取选中: OnDrawGizmosSelected…
iOS核心动画高级技巧之CALayer(一) iOS核心动画高级技巧之图层变换和专用图层(二)iOS核心动画高级技巧之核心动画(三)iOS核心动画高级技巧之性能(四)iOS核心动画高级技巧之动画总结(五) 仿射变换 iOS仿射变换是CGAffineTransform,仿射变换的特点是变换后的图形对边依然是平行的,它包括 CGAffineTransformMakeRotation(CGFloat angle) / CGAffineTransformMakeScale(CGFloat sx, CGF…
iOS Programming State Restoration 状态存储 If iOS ever needs more memory and your application is in the background, Apple might kill it to return memory to the system. 如果iOS 需要更多的memory,你的应用在后台,apple 可能杀死它来得到更多的内存给系统. This should be transparent to your u…
iOS Programming Introduction to Auto Layout   自动布局 A single application that runs natively on both the iPad and the iPhone is called a universal application. 一个原生的能运行在iPad 和iPhone 的应用叫做universal application  Then select the Homepwner target in the pr…