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

Popular posts from this blog

c# - Class in a list -

mysql - Django database model for my website -

ios - How to run a segue on itself OR another viewController -