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

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -