evin
V2EX  ›  Swift

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

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

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

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