In this lesson, we ran into code like this.
@IBAction func oprate (Sender:uibutton) {let opration = sender.currenttitle! If Userisoninput { enter () } switch opration {case ' + ': performoperation{$0+$1} case "−": performoperation{$1-$0} case ' x ': performoperation{$0*$1} case ' ÷ ': performoperation{$1/$0}//case ' √ ' : performoperation{sqrt ($)} default:break } } func performoperation (opretion: (double,double ) (Double) { if Operandstack.count >= 2 { displayvalue = opretion (Operandstack.removelast (), Operandstack.removelast ()) enter () } } /** does not have the overload of the closure parameter */// func performoperation ( Opretion:double, Double) {// if Operandstack.count >= 1 {// Displayvalue = Opretion ( Operandstack.removelast ())// Enter ()// }// }
The video is running a variety of jouissance, but we are not compiling the past ...
Comment Error: The answer was found in stack overflow: Because the swift language supports overloading, the OC language does not support overloading!
In other words, where do I relate to OC? This is obviously swift ... Take a closer look and discover that Uiviewcontroller is inherited from NSObject ...
It may be that Paul Hegarty is using a lower version of Xcode, so he doesn't encounter
About iOS8 Stanford Open Class lesson two