OC

Knowledge OS
主帖 2 条回复

为啥swift 代码在这里Markdown 不起作用呢?

hello2t hello2t · 2015年09月19日 · 更新于 2015年09月20日 · 无人欣赏。
@IBAction func operate(sender: UIButton) {
        let operation = sender.currentTitle

        if userIsInTheMiddleOfTypingANumber {
            enter()
        }

        switch operation { 
        case "×": performOperation(test)
        case "÷": performOperation { $0 / $1 }
        case "+": performOperation { $0 + $1 }
        case "−": performOperation { $0 - $1 }
        default: break
        }
    }

回复

2 条
#1
tinyfool
2015年09月19日

请看工具栏。。。

先选中代码,然后点击101,010那个按钮

登录 或者 注册