If you want to enter special symbol edit-"special Character
At first the most tangled piece of code
var operrandstack: array<double> = array<double> ()
@IBAction func Enter ()//Why should it be empty
{
Isinputnumber = false
//Operrandstack.append (Display.text)
operrandstack. Append(displayvalue)//Turn Display.text into double
}
var displayvalue: Double
{
Get
{
return nsnumberformatter(). Numberfromstring(display. Text!)!. doublevalue
}
Feeling is not equivalent to OC Reed [(nsnumber*) Dispaly.text Doublevalue] It's generally the feeling
Set
{
display. Text = "\(newvalue)"
Isinputnumber = false
}
}
}
Ibid had to lament that Swift was streamlined. Successively omitted the multiply () parameter and then return then if the last set of parameters can be performance () {$0*$1}, if the last set of parameter brackets can also be removed performance{$0*$1}
If the parameters of the function need to be changed. You can copy the function again, change the number of parameters,, the name of the function does not change, automatically match the need for which function!!
Clear constraints disrupts all constraints
Stanford Swift second day MVC