Swift SDK pre-built components

How to use our pre-build UI components in your Knock implementation.

KnockInAppFeedView

Overview

Component UI Example

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.

Note: If you are using UIKit, use KnockInAppFeedViewController.

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.

Examples

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.

Examples