# Adding a fixed, centered encrypted message at the top of every channel using the - SwiftUI SDK

**URL:** <https://community.sendbird.com/t/adding-a-fixed-centered-encrypted-message-at-the-top-of-every-channel-using-the-swiftui-sdk/10921>\
**Category:** Miscellaneous\
**Tags:** chatsdk, swiftui\
**Created:** [May 15, 2025, 4:31pm UTC](https://community.sendbird.com/t/adding-a-fixed-centered-encrypted-message-at-the-top-of-every-channel-using-the-swiftui-sdk/10921 "2025-05-15T16:31:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luchi2300](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@luchi2300](https://community.sendbird.com/u/luchi2300)\
**Post date:** [May 15, 2025, 4:31pm UTC](https://community.sendbird.com/t/adding-a-fixed-centered-encrypted-message-at-the-top-of-every-channel-using-the-swiftui-sdk/10921/1 "2025-05-15T16:31:18Z")

</div>

We are working on customising our design and have encountered a new requirement.

We need to display an encrypted message at the top of every channel. This message should remain fixed at the top of the channel, similar to a regular message, but with a custom, centered design (see attached image).

I tried pinning the message, but it still appears as a regular message without the expected fixed behavior (see attached image).  
I am aware of the `isPinnedMessage` property, which should be set to `true`, but I am unsure where and how to set this property.

Below is the code I used to pin the message:

`channel.pinMessage(messageId: message.messageId)`

**What we achieved using pinMessage:**  
It follows the standard message format, which is not centered, does not occupy the entire screen height, and includes the tick icon.

 ![Screenshot 2025-05-15 at 17.26.48](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/e/e3bf7149238eb96948d20a21d7363d77b9b608e1.png)

**What we want to achieve:**

 ![Screenshot 2025-05-15 at 17.21.48](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/5/55d0f46b4d95ec9f5d741b73c0f34256973cf18e.png)
