Search results for

[tags:apple pay,wallet]

6 results found

Post

Replies

Boosts

Views

Activity

Can I add a generic ViewModifier to the Library?
I have a ViewModifier that I use by extending View as such: extension View { func asCard() -> some View { self.modifier(CardViewModifier()) } } I tried adding it to the Library as such: @LibraryContentBuilder func modifiers(base: View) -> [LibraryItem] { LibraryItem(base.asCard) } But that produces the following error message: Protocol 'View' can only be used as a generic constraint because it has Self or associated type requirements I also tried using Any but that didn't work either.
1
0
1.3k
Jun ’20
How to avoid compilation error in Xcode 11.5 when adding custom views and modifiers to the Xcode Library
I face compilation error in Xcode 11.5 for iOS 13.5 even when declaring that my LibraryContentProvider shall be available for iOS 14 only. Error Use of undeclared type 'LibraryContentProvider' Code @available(iOS 14.0, *) struct LibraryContent : LibraryContentProvider { @LibraryContentBuilder var views: [LibraryItem] { LibraryItem( Text(Hello WWDC!), title: Custom View In The Library ) } } How to avoid this? I am asking because I'd like to ship my custom LibraryContentProvider as early as possible for people using Xcode 12 beta but I need to avoid compilation error for Xcode 11.5 users, of course :)
1
0
2.0k
Jun ’20
Can Details Be Added?
Items in the library built by Apple provide details in the form of documentation. I added documentation to my custom views, but that is not displayed when I added my view to the library. I didn’t see a way to populate this details section for custom views and modifiers in the talk or in documentation. Is this available already and I missed it?
2
0
334
Jul ’20