官网地址:https://developer.apple.com/documentation/coregraphics/cgrect
CGRect 描绘了一个矩形区域。
CGRectMake 可以构造一个 CGRect 结构体。
- x 坐标
- y 坐标
- 宽度
- 高度
横向轴向右增大,纵向轴向下增大,原点在左上角
参考:https://www.jianshu.com/p/7692b94b173d
官网地址:https://developer.apple.com/documentation/coregraphics/cgrect
CGRect 描绘了一个矩形区域。
CGRectMake 可以构造一个 CGRect 结构体。
横向轴向右增大,纵向轴向下增大,原点在左上角
参考:https://www.jianshu.com/p/7692b94b173d
相关推荐
CGRect_UIEdgeInsets
FTPopOverMenu, 简单易用的弹出Menu,支持UIButton,UIBarButtonItem,以及任何UIView或CGRect。Github demo地址:https://github.com/liufengting/FTPopOverMenu
对 UIView、UIScrollView 和 CGRect 的扩展,使视图操作更容易 ##UIView UIView 扩展提供了一个简单的界面来修改和查询 UIViews 框架 let view = UIView ( frame : CGRectMake ( 10 , 10 , 20 , 20 )) view. x = ...
它可以从任何UIView ,任何UIBarButtonItem和任何CGRect 。 最简单的API,使您可以在一行代码中更改样式。 有时我想为每个单元格客户,所以我将全局设置和单元格设置分开。 例如:我的项目经理希望显示某些菜单项,...
CGRect 的内容模式计算。 适用于 iOS 和 Mac。 在 Mac 上, UIViewContentMode是在标头中定义的,因此您可以使用它。 用法 /* * Resize `rect` to fit in `bounds` using a given `contentMode`. @param bounds ...
CGRect frame = CGRectMake (origin.x, origin.y, size.width, size.height);矩形 NSStringFromCGRect(someCG) 把CGRect结构转变为格式化字符串; CGRectFromString(aString) 由字符串恢复出矩形; CGRectInset...
@property(nonatomic) CGRect frame; // 控件的位置和尺寸(以控件本身的左上角为坐标原点) @property(nonatomic) CGRect bounds; // 控件的中点位置(以父控件的左上角为坐标原点) @property(nonatomic) CGPoint ...
CGRect sf = self.frame; sf.size.height = frameHeight; //把dropdownList放到前面,防止下拉框被别的控件遮住 [self.superview bringSubviewToFront:self]; tv.hidden = NO; showList = YES;//显示下拉框 ...
(void)collectionViewWithFrame:(CGRect)frame imageArray:(NSArray *)imageArray Direction:(UICollectionViewScrollDirection)direction timeInterval:(CGFloat )timeInterval view:(UIView *)view; /** * ...
/** * 给图片加水印图片 * * @param image 水印图片 ...- (UIImage*)imageWaterMarkWithImage:(UIImage *)image imageRect:(CGRect)imgRect alpha:(CGFloat)alpha; /** * 同上 * * @param image 同上 *
CGRect 函数 常量 枚举类型 位掩码 私有属性 图片命名 布尔 单例 导入 Xcode 工程 点语法 应该 始终 使用点语法来访问或者修改属性,访问其他实例时首选括号。 推荐: view.backgroundColor = UIColor.orangeColor...
(instancetype)PGGCarouseScrollViewWithFrame:(CGRect)frame imgsData:(NSArray *)imgsData titlesData:(NSArray *)titlesData; //不带标语的初始化方法 (instancetype)PGGCarouseScrollViewWithFrame:(CGRect)...
如:WSStar.starView.StarInView(view: self.view, rect: CGRect(x: 120, y: 80, width: 125, height: 30), currentStars: 3.5, allStars: 5, isContrainsHalfStar: false, isVariable: false) 参数: view:需要...
- (instancetype)initWithImageURLArray:(NSArray *)imageURLArray andFrame:(CGRect)frame; 自定义PageControl /** * 自定义PageControl试图,调用这个方法后,系统的PageControl就会被移除掉 */ - (void)...
SwiftCGRectExtensions 是 CGRect, CGPoint 和 CGSize 简便函数的集合,使用 Swift 编写,支持 iOS 和 OS X。 SwiftCGRectExtensions 目标是为普遍使用的 rect 操作提供清晰的函数。 特性 Operators for adding, ...
- (instancetype)initWithFrame:(CGRect)frame withTitleArray:(NSArray *)array; 协议方法 /** *点击选中协议方法 @param DropView @param index */ - (void)PGGDropView:(PGGDropView *)DropView ...
1、初始化 drawMarqueeView = WQScrollLabelView(frame: CGRect(x: 0, y: 104, width: self.view.bounds.width, height: 20)) 2、设置属性 drawMarqueeView.marqueeDirection = .left view.addSubview...
- (id)initWithFrame:(CGRect)frame titles:(NSArray *)titles views:(NSArray *)views; /** * 设置选择的菜单按钮 * * @param index 按钮的索引值 从左到右一次是0,1,2,3... */ - (void)...
textView.frame = (CGRect){10,80,CGRectGetWidth(self.view.frame)-20,100}; textView.maxLength = 200; textView.layer.cornerRadius = 5.f; textView.layer.borderColor = [[UIColor grayColor]...
let codeButton = XFetchCodeButton(frame: CGRect(x: 20, y: 100, width: 100, height: 50)) codeButton.backgroundColor = .black codeButton.normalTitle = "Fetch Code" codeButton.normalTintColor = ...