'How do I add emojis into coding projects like Xcode in Mac?

I have just started to use Xcode in my Mac, so I am pretty new. I know the basics but I don't know how to code icons into my script. For example, I namely want to add a thumbs up emoji, or a smile, but I really don't know how to really code that.

I have tried adding "👍", "thumbsup.fill" and I looked into other comments and tried their things, but it doesn't seem to work. all I see is a blank screen.

Anybody got suggestions?



Solution 1:[1]

You need to put an imageview and add the following code :

Image(systemName: "hand.thumbsup.fill")
 .resizable()
 .aspectRatio(contentMode: .fill)
 .frame(width: 25.0, height: 25.0, alignment: .center)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Saumya Gautam