Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I can't find the components to add to main.storyboard

I am using Xcode Version 13.4 (13F17a), I am trying to learn iOS development with UIKit but I am unable to find the elements to add to storyboard(ie button, textField) which force me to design programmatically like

`

class ButtonDesign:UIButton{
    func buttonUiDesign() -> UIButton{
        let buttonX = 150
        let buttonY = 150
        let buttonHeight = 50
        let buttonWidth = 100
        
        let button = UIButton(type: .system)
        button.setTitle("Click me!!", for: .normal)
        button.tintColor = .blue
        button.backgroundColor = .red
        button.addTarget(self, action: #selector(buttonClicked), for: .touchUpInside)
        
        
        button.frame = CGRect(x: buttonX, y: buttonY, width: buttonWidth, height: buttonHeight)
        
        return button
        
    }
    
    //Notification Using Haptic Engine when clicked.
    @objc func buttonClicked(sender:UIButton){
//        let alert = UIAlertController(title: "clicked", message: "you have clicked the button", preferredStyle: .alert)
//        self.present(alert, animated: true, completion:nil)
        
        let impact = UIImpactFeedbackGenerator()
        impact.impactOccurred()
        
    }

Below is the picture of the main.storyboard can someone please educate me. I want to drag and drop the elements that am choosing to viewcontroler. I am apologize for my English, am using google translator.Below is my main.storyboard Picture

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Just click to the plus symbol on the top right conner of the IDE
image

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading