Written by
Amy
on
Swift UI Snippets
Scroll View, Image View, Keyboard, UIControl extension, Gradient View, Shadow view, Custom Textfield…
UILabel
label.adjustsFontSizeToFitWidth = true
scrollView.contentInsetAdjustmentBehavior
scrollView.minimumZoomScale
scrollView.zoomScale
viewForZooming(in scrollView: UIScrollView) -> UIView?
Paging Controller
Image View
animationFrames
= [UIImage]()
for~
animationFrames.append(image)
.animationImages
.animationDuration
.startAnimating()
Keyboard
Gradient View
Shadow View
Custom TextField
imagePadding (computed)
- Create padding around the image.
alignmentRectInsets
withAlignmentRectInsets
borderWidth (computed)
- layoutMargins
UIEdgeInsets
Extension :: UIControl
touchesBegan
touchesCancelled
touchesEnded
UIImpactFeedbackGenerator(style: .heavy)
(iOS10)