40.7484445,-73.9878531
Print Out:
let responseString = NSString(data: data!, encoding: NSUTF8StringEncoding)
print(responseString)
self.lbl1.text = String(responseString)
My problem
Optional(2000 TL)
I want to write "2000 TL"
答案 0 :(得分:4)
The immutable <div ng-controler="oneController">
<span ng-bind="test"></span>
</div>
is an optional, so you need to unwrap it to get rid of the responseString
wrapping.
You can do this e.g. using the nil coalescing operator
Optional(...)
print(responseString ?? "") // Prints "" if responseString == nil
self.lbl1.text = String(responseString ?? "")
答案 1 :(得分:0)
Just try this:
delete m_pio;
m_pio = NULL
Try this for your label:
print(responseString!)
This should remove the optional...