タイトルの件なのですが、spritekitを使ってゲームを作成しております。
ボタンを押してツイッターに投稿させる事は出来たのですが、スクリーンショットを撮る方法、
画像を表示させる方法がわかりません。色々ネットで調べたのですが、わからなかったので、質問させていただいております。よろしくお願いいたします。
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { /* Called when a touch begins */ for touch: AnyObject in touches { let location = touch.locationInNode(self) let touchNode = self.nodeAtPoint(location) if touchNode == twitter { let ツイッター : SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeTwitter) ツイッター.setInitialText("\(score)") let currentViewController : UIViewController? = UIApplication.sharedApplication().keyWindow?.rootViewController! currentViewController?.presentViewController(ツイッター, animated: true, completion: nil) } }
回答1件
あなたの回答
tips
プレビュー