Hi,
You posted this under the tag "Interface Builder", but I'll answer in general and provide also links to SwiftUI. Using it you could perhaps be able to implement what you wish to, and perhaps a bit easier. Maybe others can provide more relevant pointers to Interface Builder specific things.
You'll find a good tutorial right here at the Apple Developer site: https://developer.apple.com/tutorials/swiftui
Check these too:
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/
https://developer.apple.com/swift/resources/
Also, you want to check out many good persons offering hints and tips on programming at YouTube, for example Paul Hudson, Sean Allen, Stewart Lynch, Tundsdev, Mikaela Caron, Karin Prater, Mark Moeykens, etc. I'm sure others may provide other good sources for learning. At least Paul and Mark also write excellent books on the topic, surely also the others but these I know myself.
https://www.youtube.com/@twostraws
https://www.youtube.com/@seanallen
https://www.youtube.com/@StewartLynch
https://www.youtube.com/@tundsdev
https://www.youtube.com/@MikaelaCaron
https://www.youtube.com/@SwiftyPlace
Furthermore, you'll find many open source projects at GitHub where you can start learning and including those in your future apps.
Good luck and perseverance in your learning path!