Sobes.tech
Junior — Middle

Do you have experience developing user interfaces using UIKit?

sobes.tech AI

Answer from AI

Yes, there is practice in developing user interfaces using UIKit. UIKit is a framework for creating interfaces in iOS applications, providing many ready-made components such as buttons, tables, navigation controllers, and more. For example, to create a simple button and handle its tap, you can use the following Swift code:

import UIKit

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let button = UIButton(type: .system)
        button.setTitle("Tap me", for: .normal)
        button.frame = CGRect(x: 100, y: 100, width: 150, height: 50)
        button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside)
        view.addSubview(button)
    }
    
    @objc func buttonTapped() {
        print("Button tapped")
    }
}

This is a basic example demonstrating how to create and add a button to the screen with an event handler for taps.

Do you have experience developing user interfaces… - sobes.tech