Intelligently educate your users about the right features at the right time with TipKit

Posts under TipKit tag

50 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

TipViewStyle with default dismiss button
I have created a custom TipViewStyle to have more control over the layout in the TipView. However, I've noticed that by doing so I lose the default "X" dismiss button. I do not see any way to access it from the Configuration. Is my only solution to add an Action to my Tip? Also, as an aside, has anyone figured out a way to add a shadow other than using the popoverTip? It seems to be clipped... struct Test: TipViewStyle { func makeBody(configuration: Configuration) -> some View { HStack() { configuration.image?.scaledToFit() VStack(alignment: .leading) { configuration.title configuration.message } } } }
2
1
790
Sep ’23
TipKit: showing a popover tip on a SwiftUI toolbar button
Hi folks, there's currently a known issue in TipKit due to which it won't show popover tips on buttons that are inside a SwiftUI ToolbarItem. For example, if you try this code, the popover tip will not appear: ToolbarItem { Button(action: {...}) { Label("Tap here", systemImage: "gear") } .popoverTip(sampleTip) } There's an easy workaround for this issue. Just apply a style to the button. It can be any style. Some examples are bordered, borderless, plain and borderedProminent. Here's a fixed version of the above code: ToolbarItem { Button(action: {...}) { Label("Tap here", systemImage: "gear") } .buttonStyle(.plain) // Adding this line fixes the issue. .popoverTip(sampleTip) } Hope this helps anyone running into this issue.
7
7
2.9k
Jun ’24
More control of TipKit arrow locations
Hello! Based on the lack of forum posts, I think I'm one of the first people to really be diving into TipKit. :) I'm trying to use a tip to coax users toward a button in the toolbar of a NavigationView. The docs say to put the TipView "close to the content", but the best I can do for the NavigationView toolbar is to put it in one of the views inside the Navigation View itself. I'm using a TipView with an arrowEdge: .top parameter, which results in this: I'd love to be able to move the arrow tip under the plus button. Is that possible in this early beta stage? Do I need to restructure my view hierarchy somehow?
5
1
1.1k
Aug ’23
TipKitMacros throws an error
Hi folks, I'm trying to implement TipKits to understand more better but I'm facing an error while trying to use @Parameter macro. Here is the sample code that I've tried as showed on instruction videos below struct FavoriteLandmarkTip: Tip { @Parameter static var isLoggedIn: Bool = false var title: Text { Text("Save as Favourite") } var message: Text? { Text("Your favorite landmarks always appear at the top of the list.") } var asset: Image? { Image(systemName: "star") } var actions: [Action] { [ Tip.Action( id: "learn-more", title: "Learn More" ), ] } } But I'm getting this error for isLoggedIn property External macro implementation type 'TipKitMacros.ParameterMacro' could not be found for macro 'Parameter(isTransient:customID:)'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library' Could you help me to solve this problem ?
1
0
930
Jul ’23
Tip Kit
I am trying to use tip kit in my demo app but I am unable to access its api's. When I try to call TipsCenter.shared.configure() I am getting Cannot find 'TipsCenter' in scope. I am using the latest Xcode beta and trying in swiftUI. Any solutions?
9
6
3.9k
Jul ’23
Does `TipKit` not available right now?
I want to try the new TipKit features but when I import it from project, Xcode told me that No such module 'TipKit' and I also try the following code to create a tip directly but it doesn't work and Xcode shows Cannot find type 'Tip'. What can I do to use the new feature? // MARK: Tips define here. struct bookmarkTip: Tip { }
2
0
1.8k
Aug ’23