1

ツイートの作成には TWTweetComposeViewController を使用しています。

次に、この方法でツイートを手動で送信します: https://stackoverflow.com/a/14067278/440168

標準の "Tweet sent" サウンド通知を再生するにはどうすればよいですか?

4

1 に答える 1

2

この音は非常に似ています:http ://soundjax.com/reddo/51828%5EWHISTLE.mp3

あなたはそれをこのようにプレイすることができます:

NSError *error;
NSString *path        = [NSString stringWithFormat:@"%@/%@", NSBundle.mainBundle.resourcePath, @"whistle.mp3"];
NSUrl *url            = [NSURL fileURLWithPath:path isDirectory:NO];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:self.whistleUrl error:&error];

player.numberOfLoops = 0;
player.volume        = 0.4;

if (player == nil) {
    NSLog(@"%@", error.description);
    return;
}

[player play];
于 2013-03-08T20:42:08.330 に答える