Skip to content

Instantly share code, notes, and snippets.

@angelinaFri
angelinaFri / checkbox-radio-button-extension.swift
Created February 1, 2021 13:56 — forked from kobeumut/checkbox-radio-button-extension.swift
Swift Checkbox and Radio Buttons Extension
//Checkbox
import UIKit
class CheckBox: UIButton {
// Images
let checkedImage = UIImage(named: "ic_check_box")! as UIImage
let uncheckedImage = UIImage(named: "ic_check_box_outline_blank")! as UIImage
// Bool property
var isChecked: Bool = false {
@angelinaFri
angelinaFri / CustomTextField.swift
Created January 16, 2021 11:47 — forked from soggybag/CustomTextField.swift
Adds border, corner radius, and padding to the UITextField. These properties can be set via the attribute inspector in storyboard.
import UIKit
@IBDesignable
class CustomTextField: UITextField {
var padding: UIEdgeInsets {
get {
return UIEdgeInsets(top: 0, left: paddingValue, bottom: 0, right: paddingValue)
}
}