SwiftUI Tutorial: Core Concepts: Custom Modifiers - Part 1: Using Only Extensions

preview_player
Показать описание
SwiftUI Tutorial: Core Concepts: Custom Modifiers - Part 1: Using Only Extensions

In this episode we’re going to look at building custom modifiers by leveraging the power of extensions. We also go into the nature of extension based modifiers and how they are completely unrestricted in what we are allowed to do even to the point where what we are returning bares no relation to the component we’re modifying.

================

PureSwiftUI is a free Swift Package that includes a multitude of useful extensions and properties to make your life easier with SwiftUI resulting in cleaner code that takes less time to write.

It's a huge time-saver so I do encourage you to check it out.

You can get PureSwiftUI here:

Check out PureSwiftUITools for additional SwiftUI utility type things:

If you want to ask me a question or follow me for updates, you can do so on Twitter:
Рекомендации по теме
Комментарии
Автор

As Joseph Goodrick correctly points out in the comments, I meant to pass the “fill” parameter when calling self.fill within the extension rather than using the “gradient” constant directly!

CodeSlicing
Автор

Keep these coming! Your channel will surely take off with great content like this.

clayellis
Автор

would be great to see a video series on charts and graphs, have you ever thought about adding some graph functionality to PureSwfitUI ?

henryhudson
Автор

Did you mean to pass the fill parameter you created into the self.fill() method, rather than short-circuiting it by passing in gradient directly?

JosephGoodrick
welcome to shbcf.ru