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
translatesAutoresizingMaskIntoConstraintsbecauseDesignXdoes it for you. - Satisfy all constraints
X-axis,Width,Y-axis&Heightin one line functionlayout() - by covering different ways to statisfy each constraint using
enumparameters - also have
constraint()function to use constraints individually - add array of subviews
- create dynamic
UIScrollViewby one line functioncreate - create
UIStackViewby one line functioncreate - create attributed
UILabeltext 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
leadingof superview - trailling to
trailingof superview - top to
topof superview - bottom to
bottomof superview
- leading to
trailingof view - trailling to
leadingof view - top to
bottomof view - bottom to
topof view
BelalSamy, belalsamy10@gmail.com
DesignX is available under the MIT license. See the LICENSE file for more info.
