ios - Swift - Assign a UILabel with NSExpression -
how can assign uilabel in app nsstring expression? attempt was:
@iboutlet weak var imput: uilabel! @iboutlet weak var output: uilabel!
...
...
...
@ibaction func equal(sender: anyobject) { calculate = nsexpression(format: imput.text!) output = calculate.expressionvaluewithobject(nil, context: nil) as! uilabel }
i had use output.text =
... instead of output =
... , instead of as! uilabel
used 2 other variables convert nsexpression double , string.
Comments
Post a Comment