Skip to content

vcxk/CGRectLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image func left(_ v:CGFloat = 0.5, offset:CGFloat) -> CGRect
v >= -1 and v <= 1
width = rect.width * v
else
width = v

image func top(_ v:CGFloat = 0.5, offset:CGFloat) ->CGRect

image let inrect = rect.inset(by: UIEdgeInsets(top: 10, left: 15, bottom: 0, right: 15))
let line = inrect.top(50,offset:60)
let rect1 = line.left(120)
let rect2 = line.righ(-120)

or

let rect1 = rect.inset(by: UIEdgeInsets(top: 10, left: 15, bottom: 0, right: 15)).top(50,offset:60).left(120)
let rect2 = rect.inset(by: UIEdgeInsets(top: 10, left: 15, bottom: 0, right: 15)).top(50,offset:60).left(-120)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages