2019-07-01から1ヶ月間の記事一覧
if let url = URL(string: "https://cecilma2018.blogspot.com") { UIApplication.shared.open(url, options: [:]) }
var timer: Timer! timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true, block: { (_) in self.perform() }) func perform() { // some process if XXX { // time to end the Timer timer.invalidate() } }
import SpriteKit class MyScene: SKScene, SKPhysicsContactDelegate { override func didMove(to view: SKView) { ... physicsWorld.contactDelegate = self } func didBegin(_ contact: SKPhysicsContact) { guard let name1 = contact.bodyA.node?.name …