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