UIView 和 CGRect 扩展 Geometry

码农软件 · 软件分类 · 其他(Others) · 2019-07-23 08:12:50

软件介绍

Geometry 是 UIView 和 CGRect 扩展,添加了属性来进行更高效的操作:

  • top

  • left

  • bottom

  • right

  • width

  • height

  • centerX

  • centerY

  • center

myView.frame = CGRectMake(10, 10, 20, 20)
myView.left = 20 // Frame is now {{20, 10}, {20, 20}}
myView.width = 100 // Frame is now {{20, 10}, {100, 20}}
myView.right = 150 // Frame is now {{50, 10}, {100, 20}}

同时也提供 StringLiteralConverters 给 CGRect 和 CGPoint,所以你可以用 Strings 来初始化 CGRect:

myView.frame = "10, 10, 20, 20"
myView.center = "50, 50"
CGRect rect = "20, 25, 100, 100"


本文地址:https://codercto.com/soft/d/10741.html

XForms Essentials

XForms Essentials

Micah Dubinko / O'Reilly Media, Inc. / 2003-08-27 / USD 29.95

The use of forms on the Web is so commonplace that most user interactions involve some type of form. XForms - a combination of XML and forms - offers a powerful alternative to HTML-based forms. By pro......一起来看看 《XForms Essentials》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

随机密码生成器
随机密码生成器

多种字符组合密码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具