Useful extensions for my Swift code

UIViewController extensions

presentAlert(withTitle title: String, message : String)

presentAlertDialog(withTitle title: String, message : String, action1: String, action2: String)

presentActionSheet(withTitle title: String, message : String)

presentActionSheetDialog(withTitle title: String, message : String, action1: String, action2: String)

UIView extensions

halfCornerRadius()

addShadows(radius: CGFloat, opacity: Float)

makeGradient(color1: UIColor, color2: UIColor)

buttonBorder(color: UIColor, width: CGFloat)

UIColor extensions

UIColor(hex: String)

color.htmlRGBColor

GitHub

View Github