xcode7 如何将string转化成int
xcode吧
全部回复
仅看楼主
level 1
求解
2015年11月04日 12点11分 1
level 1
let a:Int = Int(value.txt)
value是从键盘输入的,但是这么写报错。
xcode6有一个toInt() 方法,但是xcode7没有了
2015年11月04日 12点11分 2
level 1
报错:value of optional type 'string?'not unwrapped;
did you mean to use '!'or'?'
2015年11月04日 13点11分 3
level 16
可以将String转换为NSString,然后在使用intValue
2015年11月06日 01点11分 4
level 9
as
2015年11月06日 05点11分 5
level 2
[狂汗]为何都用Xcode写c
2015年11月06日 09点11分 6
1