Hi there! I used the custom cells guide and currently have the custom cells I want implemented. I just had a question about the initialization and usage of these cells. This might be a very basic doubt but I am really new to Swift so please excuse me!
Think it might make things easier to first show what's going on.
This is the init function for my custom message cell, introBtns:

And this is where I create a message of the introBtns type, with its initializer:

How do I use the "hello world" string passed in? When I print the value of message.kind in my custom cell class, I see it ouputs followUpBtns(Optional("hello world")), but how can I extract just the string itself?
I honestly feel that is a really dumb question but I don't understand where the arguments for the self.init function are defined and how I can modify them.
switch message.kind {
case .introBtns(let text):
// Text=hello world
default:
// Handle non custom kinds
}
Sent with GitHawk
Thank you!
Most helpful comment
Sent with GitHawk