Tagged: UIKit

There are 30 items tagged #UIKit.
And there a lots of other tags to explore.

How to change UIImage color in Swift

Learn different ways to color an UIImage in Swift.

How to disable dark mode in iOS

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.

How to position an UIButton image to the right side of the text

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.

How to remove extra padding when converting HTML to NSAttributedString

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.

How to present a Bottom Sheet in iOS 15 with UISheetPresentationController

In iOS 15, we finally have native UI for a bottom sheet. Let's explore its behavior and limitation.

How to make a custom button style with UIButton.Configuration in iOS 15

Learn how to create an outline button style.

How to ignore safe area insets in UIKit

Learn how to make UIScrollView, UITableView, and UICollectionView ignore safe area insets and put their content behind that navigation bar.

Dynamic button configuration in iOS 15

Learn how to change button configuration, e.g., title and color, based on the internal and external changes.

A new way to style UIButton with UIButton.Configuration in iOS 15

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.

How to resize and position an image in UIImageView using contentMode

Learn thirteen ways to position and resize UIImage in UIImageView.

How to resize an UIImageView to fit a container view using auto layout

Learn how to fit image view to any container by changing Content Hugging Priority and Content Resistance Priority.

UIStackView padding

Learn how to add padding to your stack view's content.

Custom UIStackView spacing

Learn a lesser-known API to create a custom UIStackView spacing without nested them together.

Scaling custom fonts automatically with Dynamic Type

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.

Cross-promote apps with SKOverlay

SKOverlay is a new tool from Apple for doing apps cross-promotion.

Should I learn UIKit or SwiftUI

The most popular question since the introduction of SwiftUI. Here is my thought after WWDC20.

What is backIndicatorTransitionMaskImage

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?

How to change a back button image

Learn how to change a UINavigationBar back button indicator.

Responsive design with UIStackView

Learn how UIStackView can help to make your UI adapt to size change.

Match a view's shadow to the Sketch shadow

Learn how to set shadow spread and blur from a Sketch design.

How to set cornerRadius for only some corners

Learn to round specific corners, e.g., top-left and top-right.

How to make multi-line text in UIButton

The default appearance of UIButton is a single line text, but it also supports a multi-line text with some minor tweak.

How to display HTML in UILabel and UITextView

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.

How to remove text from a navigation bar back button

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.

tintColor

Introduce you to one of an essential part of iOS theming. What is tintColor and its benefit.

UINavigationBar changes in iOS13, Part2: UISearchController

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.

UIRefreshControl with new card style modal

Make sure your refresh control working on iOS 13.

Custom UIHostingController

Learn how to create a custom subclass of UIHostingController and its benefit.

How to use SwiftUI in UIKit

Using SwiftUI as UIView and UIViewController

How to use UIKit in SwiftUI

Using UIView and UIViewController in SwiftUI

See all tags.