#iOS common code library
-
add tint color to a button
let button = UIButton(frame: aRectHere) let buttonImage = UIImage(named: "imageName") button.setImage(buttonImage?.withRenderingMode(.alwaysTemplate), for: .normal) button.tintColor = .white
-
Add
Mark
to Swift code//MARK: viewDidLoad //TODO: - viewDidLoad //FIXME - viewDidLoad
-
UIView
func addConstraint(_ constraint: NSLayoutConstraint)
methodWhen developing for iOS 8.0 or later, set the constraint’s isActive property totrue instead of calling the addConstraint(_:) method directly. The isActive property automatically adds and removes the constraint from the correct view.