現在の画面のスクリーンショットを取り込んでテキストメッセージに貼り付ける(iOS)アプリにボタンを入れたいと思っています。私は、この他のアプリで見ているようcocos-2dのcaptureScreen C++ - キャプチャしたイメージの使用方法や保存方法は?
...
私は作業を送るメッセージを持っている、と私はスクリーンショットの作業を持っていると思うが、私はスクリーンショットが保存されている場所を知りませんかそれの使い方。
アプリ内のボタンから呼び出された送信マイメッセージ...
void GameOverScene::messageCallBack(cocos2d::Ref *sender) {
CocosDenshion::SimpleAudioEngine::getInstance()->playEffect(ALL_BUTTONS_CLICK_SOUND_NAME);
utils::captureScreen(CC_CALLBACK_2(GameOverScene::afterCaptured, this), "screenshot.png");
__String *messageTextOne = __String::create("sms:&body=Hey,%20I%20just%20hit%20a%20score%20of%20");
__String *messageTextTwo = __String::createWithFormat("%i", score);
__String *messageURL = __String::createWithFormat("%s%s", messageTextOne->getCString(), messageTextTwo->getCString());
Application::getInstance()->openURL(messageURL->getCString());
}
とスクリーンショット機能がある...私はコンソールにメッセージを取得
void GameOverScene::afterCaptured(bool succeed, const std::string &outputFile) {
if (succeed) {
log("Screen capture succeeded");
Size screenSize = Director::getInstance()->getWinSize();
RenderTexture * tex = RenderTexture::create(screenSize.width, screenSize.height);
tex->setPosition(screenSize.width/2, screenSize.height/2);
tex->begin();
this->getParent()->visit();
tex->end();
tex->saveToFile("Image_Save.png", Image::Format::PNG);
} else {
log("Screen capture failed");
}
}
「スクリーン・キャプチャー成功しました。私のメッセージアプリケーションは、あらかじめ埋め込まれたテキストメッセージで開きます。
私が行う必要があるのは、このメッセージにスクリーンショットを追加することですが、その方法、スクリーンショットが保存されている場所、保存されているスクリーンショットの使用方法はわかりません。
テキスト。スクリーンショットをメッセージに送信するにはどうすればいいですか? – Richard
試してみてください:http://stackoverflow.com/questions/21699756/send-picture-text-in-imessage-in-ios-programatically – Makalele