drawRect introduce
来源:互联网 发布:C语言求主析取范式 编辑:程序博客网 时间:2024/05/21 07:13
drawRect:
Draws the receiver’s image within the passed-in rectangle.
- (void)drawRect:(CGRect)rect
Parameters
rect
A rectangle defining the area to restrict drawing to.
Discussion
Subclasses override this method if they actually draw their views. Subclasses need not override this method if the subclass is a container for other views. The default implementation does nothing. If your custom view is a direct UIView
subclass, you do not need to call the implementation of super
. Note that it is the responsibility of each subclass to totally fill rect if its superclass’s implementation actually draws and opaque
is YES
.
When this method is invoked, the receiver can assume the coordinate transformations of its frame and bounds rectangles have been applied; all it needs to do is invoke rendering client functions. Use the UIGraphicsGetCurrentContext
function to get the current graphics context for drawing that also has the coordinate origin in the upper-left corner. Do not retain the graphics context since it can change between calls to thedrawRect:
method.
Availability
Available in iPhone OS 2.0 and later.
See Also
– setNeedsDisplay
– setNeedsDisplayInRect:
@property contentMode
Declared In
UIView.h
- drawRect introduce
- introduce
- Introduce
- introduce
- drawRect()
- drawRect
- drawRect
- DrawRect
- DrawRect
- drawrect
- DrawRect
- SpringFrameWork Introduce
- Introduce IOC
- Introduce VC
- Introduce Clearcase
- iaSolution Introduce
- Introduce RESTful
- Introduce yourself
- 这[
- ssl HTTPS
- Using jacob to operate the office
- SQL语法之高级查询
- 页面隐藏CSS样式display和visibility的区别
- drawRect introduce
- Javascript的IE和Firefox兼容性汇编
- 经纬度"度分秒"与"十进制"之间的转换
- Hello Csdn Blog
- 意外导致Win2003的0x80090016错误
- Wesbphere mq 接收和发送消息及文件
- PMBOK重温笔记(四)
- IE和FF中高度自适应
- 数学符号读音