We can create a view controller that represents a SwiftUI view by subclassing a UIHostingController. Let's learn how to do it.
Learn how to use SwiftUI view as a UIViewController in a UIKit project that uses a Storyboard.
Learn how to use a SwiftUI view as a UIView in a UIKit project.
We can use SwiftUI view in UIKit by wrapping it in UIViewController. Let's learn how to do it.
Two common reasons make the preferredStatusBarStyle not getting called.
Learn how to change a status bar text color in UIKit app.
There are many ways to create a rounded corners button in UIKit based on the minimum iOS version you want to support. Let's learn how to do it.
Learn how to use UIViewController as a SwiftUI view.
In iOS 16, Apple introduces three new width styles to the SF font family. Let's see what they look like and how to use them.
Learn how to convert UIKit UIFont to SwiftUI Font.
Learn different ways to color an UIImage in Swift.
If you are not ready to make your app support dark mode, you can opt-out of that. You can do disable it for an entire app or partially. Learn different ways to disable dark mode in iOS.
By default, when you set an image to an UIButton, it will position on the leading edge of the text. Let's learn how to put it on the trailing edge instead.
When you convert HTML string to NSAttributedString, sometimes, you will get an extra unwanted bottom padding. Learn what is causing this and how to mitigate the problem.
In iOS 15, we finally have native UI for a bottom sheet. Let's explore its behavior and limitation.
Learn how to create an outline button style.
Learn how to make UIScrollView, UITableView, and UICollectionView ignore safe area insets and put their content behind that navigation bar.
Learn how to change button configuration, e.g., title and color, based on the internal and external changes.
The first part in the series "What's new in UIKit button". An introduction to a new button configuration, a struct that is shaping and styling your button. You no longer need to subclass UIButton ever again with button configuration.
Learn thirteen ways to position and resize UIImage in UIImageView.
Learn how to fit image view to any container by changing Content Hugging Priority and Content Resistance Priority.
Learn a lesser-known API to create a custom UIStackView spacing without nested them together.
Font is an essential part of an app. A good selection of font would make your app stand out from the crowd. But whatever fonts you choose, you have to make sure it doesn't lose its core function, readability. You might feel reluctant to use a custom font in the past because you might lose the benefit of dynamic type goodness that Apple provides with their system font. Since iOS 11, this is no longer the case. You can easily use your custom font dynamic type.
SKOverlay is a new tool from Apple for doing apps cross-promotion.
The most popular question since the introduction of SwiftUI. Here is my thought after WWDC20.
To set a custom image for the back button, we need to set an image to both backIndicatorImage and backIndicatorTransitionMaskImage, but what does backIndicatorTransitionMaskImage really mean?
Learn how to change a UINavigationBar back button indicator.
Learn how UIStackView can help to make your UI adapt to size change.
Learn how to set shadow spread and blur from a Sketch design.
Learn to round specific corners, e.g., top-left and top-right.
Learn different ways to control the status bar style.
The default appearance of UIButton is a single line text, but it also supports a multi-line text with some minor tweak.
When you work with an API, there would be a time when your backend wants to control a text style, and HTML is the most common format for the job. Do you know that WKWebView is not the only way to present HTML string? Learn how to render it in UILabel and UITextView.
There are a lot of hacky ways to modify or remove a back button title. This tip will show you how to do it properly.
Introduce you to one of an essential part of iOS theming. What is tintColor and its benefit.
Revisit of navigation bar appearance — this time with a UISearchController. If you have a search bar in your navigation bar, you might need to recheck when you build your app against iOS13.
Make sure your refresh control working on iOS 13.
Learn how to create a custom subclass of UIHostingController and its benefit.
See all tags.