How to copy text to the clipboard in iOS

Learn how to copy and paste text from clipboard in iOS.

How to request users to review your app in UIKit

Learn how and when you should ask for a user's review.

How to add a Toolbar in UINavigationController

Learn how easy it is to add a toolbar on a view controller in UIKit.

Built-in symbol animations in UIKit controls

In iOS 17, we can enable symbols animation in UIKit controls using the new property. Let's learn how to do it.

What is contentInset in a scroll view

Learn the importance of content inset.

How to use AttributedString in UIKit

Learn how to use the new AttributedString inside UIKit components.

Configure Launch screen in UIKit without Storyboard

In Xcode 12 and iOS 14, we got a new way to configure an app launch screen without a Storyboard. Let's learn how to do it.

How to Hide Navigation Bar on Tap in UIKit

Since iOS 8, we can easily add a tap gesture to show and hide a navigation bar and toolbar. Let's learn why and how to do it.

How to Hide Toolbar on Scroll in iOS

Since iOS 8, we can easily hide a toolbar when users scroll. Let's learn why and how to do it.

How to Hide Navigation Bar when Keyboard is shown in UIKit

Since iOS 8, we can easily hide a navigation bar when we show the keyboard.

How to Play Haptic Feedback or Vibrate using UIFeedbackGenerator

Learn what Haptic feedback is and how to use it.

How to Hide Navigation Bar on Scroll in UIKit

Since iOS 8, we can easily hide a navigation bar when users scroll. Let's learn why and how to do it.

How to use SwiftUI as UIView in Storyboard

Learn how to use SwiftUI view as a UIView in a UIKit project that uses a Storyboard.

How to use SwiftUI in Storyboard using UIHostingController subclass

We can create a view controller that represents a SwiftUI view by subclassing a UIHostingController. Let's learn how to do it.

How to use SwiftUI as UIViewController in Storyboard

Learn how to use SwiftUI view as a UIViewController in a UIKit project that uses a Storyboard.

Using SwiftUI in UIKit as UIView

Learn how to use a SwiftUI view as a UIView in a UIKit project.

Using SwiftUI in UIKit as UIViewController

We can use SwiftUI view in UIKit by wrapping it in UIViewController. Let's learn how to do it.

How to fix preferredStatusBarStyle not getting called

Two common reasons make the preferredStatusBarStyle not getting called.

How to change Status Bar text color in iOS

Learn how to change a status bar text color in UIKit app.

How to use UIView in SwiftUI

Learn how to use UIView as a SwiftUI view.

How to create Rounded Corners Button in UIKit

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.

How to use UIViewController in SwiftUI

Learn how to use UIViewController as a SwiftUI view.

SF Font Expanded, Condensed, and Compressed: Three New font width styles in iOS 16

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.

How to use UIFont in SwiftUI Font

Learn how to convert UIKit UIFont to SwiftUI Font.

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 set status bar style

Learn different ways to control the status bar style.

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.