码迷,mamicode.com
首页 > 其他好文 > 详细

CGRectMake & CGSizeMake

时间:2015-09-15 08:14:25      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:

CGRectMake
Returns a rectangle with the specified coordinate and size values.

Declaration
SWIFT
func CGRectMake(_ x: CGFloat,
              _ y: CGFloat,
              _ width: CGFloat,
              _ height: CGFloat) -> CGRect
OBJECTIVE-C
CGRect CGRectMake ( CGFloat x, CGFloat y, CGFloat width, CGFloat height );
Parameters
x   
The x-coordinate of the rectangle’s origin point.
y   
The y-coordinate of the rectangle’s origin point.
width   
The width of the rectangle.
height   
The height of the rectangle.
Return Value
A rectangle with the specified location and dimensions.

Import Statement
OBJECTIVE-C
@import CoreGraphics;
SWIFT
import CoreGraphics

 

coordinate坐标的意思;rectangle矩形的意思;

 

 

CGSizeMake
Returns a size with the specified dimension values.

Declaration
SWIFT
func CGSizeMake(_ width: CGFloat,
              _ height: CGFloat) -> CGSize
OBJECTIVE-C
CGSize CGSizeMake ( CGFloat width, CGFloat height );
Parameters
width   
A width value.
height   
A height value.
Return Value
Returns a CGSize structure with the specified width and height.

Import Statement
OBJECTIVE-C
@import CoreGraphics;
SWIFT
import CoreGraphics

CGRectMake & CGSizeMake

标签:

原文地址:http://www.cnblogs.com/wenios/p/4809120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!