你的位置:首页 > 软件开发 > 操作系统 > iOS Programming Views :Redrawing and UIScrollView

iOS Programming Views :Redrawing and UIScrollView

发布时间:2015-05-08 00:00:45
iOS Programming Views :Redrawing and UIScrollView 1.1 event  You are going to see how views are redrawn in response to an event. ...

iOS Programming Views :Redrawing and UIScrollView

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.

你可以声明属性在header文件,也可以声明在class extensions中。

#import "BNRHypnosisView.h"

@interface BNRHypnosisView ()

@property (strong, nonatomic) UIColor *circleColor;

@end

@implementation BNRHypnosisView

 

These three lines of code are a class extension with one property declaration.

有三行代码在一个类扩展中。

 

When the user touches a view, the view is sent the message touchesBegan:withEvent:.

当用户触摸一个view 时,这个view将会发送消息给tochesBegan:withEvent:

 

Override touchesBegan:withEvent: to change the circleColor property of the view to a random color.

重写touchesBegan:withEvent方法

// When a finger touches the screen

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:iOS Programming Views :Redrawing and UIScrollView

关键词:IOS

IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。