Swift SDK pre-built components
How to use our pre-build UI components in your Knock implementation.
KnockInAppFeedView
Overview
KnockInAppFeedView
is a SwiftUI view that renders the in-app notifications feed using data from KnockInAppFeedViewModel
. It provides a customizable and interactive user interface for displaying notifications.
⚠️
Initializing the Feed. Please remember that you will still need to initialize the
feedManager
manually before displaying this component. Check out our FeedManager documentation for more information. See below for an example of how to initialize the feedManager
.Properties
themeInAppFeedThemeDefines the appearance of the feed view and its components.
Customization
You can customize almost every aspect of the UI of the KnockInAppFeedView
using our customizable themes.
Using UIKit
If you are using UIKit, use InAppFeedViewController
.
See below for an example of how to use this component.
Examples
SwiftUI
UIKit
InAppFeedNotificationIconButton
Overview
InAppFeedNotificationIconButton
is a SwiftUI view that renders a bell icon button to your application that shows the current count of unread or unseen notifications. This can be used to open your NotificationFeed.
Properties
themeInAppFeedNotificationIconButtonThemeDefines the appearance of the feed view and its components.
action() -> VoidA callback to alert you when user taps on the button.