evin
V2EX  ›  Swift

为什么 let digit = sender.currentTitle 是错误的?

  •  
  •   evin · Jan 23, 2016 · 5278 views
    This topic created in 3965 days ago, the information mentioned may be changed or developed.

    非要让我用 下划线代替 let 不是定义 变量吗

    2 replies  •  2016-02-14 10:57:20 +08:00
    evin
    evin
    OP
    Jan 23, 2016
    1
    发现原因了。。。原来是因为下面的一条语句 print ("digit = \(digit)") 应该把\ 改成/
    huangweihua
    huangweihua
    Feb 14, 2016
    2
    。。。因为你没使用,使用了就好了,你给的答案也是,\()引用变量的语法写错了。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1441 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:52 · PVG 00:52 · LAX 08:52 · JFK 11:52
    ♥ Do have faith in what you're doing.