Posts

Post not yet marked as solved
1 Replies
1.3k Views
Hello. Please tell me, I accidentally deleted main.storyboard then took it out of the trash, and back inserted into the program code. But right not moccasin letter m, and is worth "?". And when you turn on the application, the program does not go with Launch.on the main screen
Posted Last updated
.
Post not yet marked as solved
2 Replies
1k Views
//An error appears in the code. I'm an aspiring developer. Learn. The application uses UITextField to enter the minimum and maximum range of numbers. Then a random number from this range should be written to the Label.import UIKitimport GameplayKitclass ViewController: UIViewController { @IBOutlet weak var labelResult: UILabel! @IBOutlet weak var imageView: UIImageView! @IBOutlet weak var textFieldFrom: UITextField! @IBOutlet weak var textFieldTo: UITextField! @IBOutlet weak var actionButton: UIButton! override func viewDidLoad() { super.viewDidLoad() labelResult.font = labelResult.font.withSize(30) actionButton.setTitleColor(.white, for: .normal) actionButton.backgroundColor = .blue } @IBAction func selectionButton(_ sender: Any) { textFieldTo.text = "100" textFieldFrom.text = "0" var lowestValue: Int? = Int(textFieldFrom.text!) var highesttValue :Int? = Int(textFieldTo.text!) labelResult.text = "\( init(randomSource: GKRandom, lowestValue: lowestValue, highestValue: highesttValue))". //Problem } }
Posted Last updated
.