Top Tabs in SwiftUI
Reading time: 1 min
This tutorial shows how to add Android-like top tabs in SwiftUI.
SVG images in SwiftUI
Scrolling ScrollView programatically
Reading time: 1 min
This recipe is about how to scroll a SwiftUI ScrollView
programatically. Here's a quick breakdown of what to do:
- For iOS 13 - tough luck - it can't be done. For whatever reason, this is one of things that were deemed less important for the initial release of SwiftUI.
- For iOS 14 and above - embed your
ScrollView
's root view in aScrollViewReader
, and then use thescrollTo
method.
Reading time: 1 min
This tutorial shows how to create a custom Swiftui Button style with distinct disabled and pressed states.
Clip content in wrapped UITextField
Reading time: 1 min
When implementing a custom TextField
by wrapping a UITextField
in UIViewRepresentable
(just like we did in our custom SecureField that tracks focus change, you need to be careful as its size normally grows with its content.