Collection of Design extensions' one-line-functions trying to mimic the tools of UI/UX like Adobe XD and Figma, so anything designer can do you can do without writting alot of code ✨
- Constraints are active by default.
- No need to set
translatesAutoresizingMaskIntoConstraints
becauseDesignX
does it for you. - Satisfy all constraints
X-axis
,Width
,Y-axis
&Height
in one line functionlayout()
- by covering different ways to statisfy each constraint using
enum
parameters - also have
constraint()
function to use constraints individually - add array of subviews
- create dynamic
UIScrollView
by one line functioncreate
- create
UIStackView
by one line functioncreate
- create attributed
UILabel
text by one line functioncreate
- fill with image, gradient or color (
hex
,uicolor
,rgb
) - rounded corners for all corners or specify each corner individually
- rotate the view to a certain angle
- make a shadow background for your view
- change the shape of your view to a square or circle
- make a stroke or border to your view
- build a series of animation actions and transfromations
DesignX is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DesignX'
To run the example project, clone the repo, and run pod install
from the Example directory first.
import 'DesignX'
Constraints behave different if it's attach to superview
or any other view
nil = superview
by default, so its easy to change superview without change alot of code
- leading to
leading
of superview - trailling to
trailing
of superview - top to
top
of superview - bottom to
bottom
of superview
- leading to
trailing
of view - trailling to
leading
of view - top to
bottom
of view - bottom to
top
of view
BelalSamy, [email protected]
DesignX is available under the MIT license. See the LICENSE file for more info.