How can I convert Int32 to Int in Swift?

前端 未结 4 1690
抹茶落季
抹茶落季 2021-01-03 20:16

It should be easy but I can only find the reverse conversion. How can I convert Int32 to Int in Swift? Unless the problem is different?

I have a value stored in Core

4条回答
  •  萌比男神i
    2021-01-03 20:48

    Am I missing something or isn't this ridiculously easy?

    let number1: Int32 = 10
    let number2 = Int(number1)
    

提交回复
热议问题