|
|
|
|
|
by UnfalseDesign
3721 days ago
|
|
I got similar results. I took some sample code from the Apple SpriteKit documentation: CGFloat distance = sqrtf((clickPoint.x-charPos.x)*(clickPoint.x-charPos.x)+
(clickPoint.y-charPos.y)*(clickPoint.y-charPos.y));
And got this in Swift: var distance:CGFloat = sqrtf((*((clickPoint.y-charPos.y)*()
Most of the code I put in converted to Swift correctly (though it wasn't efficient Swift code) but the above line was just plain wrong. So, it still seems a little buggy but it is a good idea. Like you pointed out, it is only useful for Objective-C to Swift since the Foundation framework is not available in Android. |
|
Our mapping technology : https://docs.myappconverter.com/mapping_tech/ios2android/
iOS project converion : https://apps.myappconverter.com/users/sign_up