by Frank Vernon | Feb 18, 2021 | Print Command, Troubleshooting, Variables
Example code: var a = 5var b = 8print(“a: \(a)”)print(“b: \(b)”)// To make the values of “a” and “b” reversed, see the code below. //var c = aa = bb = cprint(“a: \(a)”)print(“b: \(b)”) The printed...
by Frank Vernon | Feb 18, 2021 | Print Command
Basic Print command:print(“This is text that is printed”)The result will be:This is text that is printed Running simple code inside a print command uses \(something) inside it.Example:print(“This number 25 is the same as \(20+5).)The result will...
by Frank Vernon | Feb 18, 2021 | Button
When moving a button action into the View coding screen, CRTL + click and drag the button BELOW the “viewDidLoad” { bracketed } area. In many cases, Touch Up Inside is the best response for this, especially when it’s a basic button response. This...
by Frank Vernon | Feb 18, 2021 | Images
// diceImageView1.image = #imageLiteral(resourceName: “DiceThree”) // diceImageView2.image = #imageLiteral(resourceName: “DiceFour”)
by Frank Vernon | Feb 18, 2021 | Images, Xcode
To make an “Interface Builder Outlet” (IBOutlet), CTRL + click and drag the image ABOVE viewDidLoad and BELOW “class ViewController” This allows for giving a button an interface NAME so things like buttons can interact and change...
Recent Comments