Skip to content

Paul Young-Suk Lee

SWE @lyft. Currently working on data infrastructure

  • EspaƱol
  • English

Category Archives: Uncategorized

How to deactivate (disable) buttons in SwiftUI

Use the .disabled modifier on views to deactivate any elements with a boolean value set to true.

Posted byPaul Young-Suk LeeOctober 25, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to deactivate (disable) buttons in SwiftUI

How to detect tap gestures in SwiftUI

Use the handy onTapGesture method to recognize taps on views.

Posted byPaul Young-Suk LeeOctober 22, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to detect tap gestures in SwiftUI

How to detect a dragging motion with DragGesture in SwiftUI

Use the DragGesture struct within a .gesture modifier to detect any type of dragging motion alongside the methods of .onChanged and .onEnded with the DragGesture.

Posted byPaul Young-Suk LeeOctober 22, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to detect a dragging motion with DragGesture in SwiftUI

How to set the size of SF Symbols in SwiftUI?

Because SF Symbols are similar to fonts you can set the size directly with the .font modifier and passing in a size.

Posted byPaul Young-Suk LeeOctober 20, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to set the size of SF Symbols in SwiftUI?

How to present a modal view with Sheet in SwiftUI

A modal view is known as a Sheet in SwiftUI. You can use the method on views to open up a sheet on top of the view it’s attached on by passing in a boolean variable binding, optionally a closure to run when dismissed and the view to show in the modal.

Posted byPaul Young-Suk LeeOctober 19, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to present a modal view with Sheet in SwiftUI

How to use Picker in SwiftUI?

Using the Picker struct you can build out your own view to let users select from a set of items by passing in a label, variable to bind the selection, and the data and views to compute from e.g. content.

Posted byPaul Young-Suk LeeOctober 18, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to use Picker in SwiftUI?

How to rotate views in SwiftUI?

You can rotate views by some number of degrees using the .rotationEffect method.

Posted byPaul Young-Suk LeeOctober 14, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to rotate views in SwiftUI?

How to create a Button in SwiftUI?

You can use the built-in Button struct to create tappable buttons in SwiftUI. Each Button takes in an action to fire e.g. printing to the console, and a View to render for the button (like a Text() field!).

Posted byPaul Young-Suk LeeOctober 13, 2021December 16, 2021Posted inenglish, ios, swiftui, UncategorizedLeave a comment on How to create a Button in SwiftUI?

How to detect finger drags with SwiftUI

You can detect a dragging motion in SwiftUI with DragGesture and passing it into the .gesture modifier.

Posted byPaul Young-Suk LeeOctober 12, 2021Posted inUncategorizedLeave a comment on How to detect finger drags with SwiftUI

How to animate Views in SwiftUI?

SwiftUI comes with an .animation modifier that can be applied to any View that conforms to the Animatable property. This includes all Shape like Circle. You can use it by applying the .animation modifier to any of these views with the default being an ease in/ease out animation.

Posted byPaul Young-Suk LeeOctober 11, 2021Posted inUncategorizedLeave a comment on How to animate Views in SwiftUI?

Posts navigation

Newer posts 1 2
Paul Young-Suk Lee, Blog at WordPress.com.
  • Follow Following
    • Paul Young-Suk Lee
    • Already have a WordPress.com account? Log in now.
    • Paul Young-Suk Lee
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar