Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
@IValue CGFloat を Int に変換するにはどうすればよいですか?
私は次のことを続けてcannot convert @IValue CGFloat to Integerいます:
cannot convert @IValue CGFloat to Integer
@IBOutlet var userObject : UIImageView func returnYPosition(yPosition: Integer) -> Integer { return userObject.center.y }
Intタイプを前後に渡し、キャストする必要があります。
Int
func returnYPosition(yPosition: Int) -> Int { return Int(userObject.center.y) }