ユーザーが1秒間に最大20枚の写真を撮ることができる1つの写真キャプチャアプリを作成しています。Apple の AVCam サンプル コードを既に試しましたが、20 FPS で静止画を撮影することはできません。
この速度で写真を撮る他の方法はありますか?
ユーザーが1秒間に最大20枚の写真を撮ることができる1つの写真キャプチャアプリを作成しています。Apple の AVCam サンプル コードを既に試しましたが、20 FPS で静止画を撮影することはできません。
この速度で写真を撮る他の方法はありますか?
このデモを参照してください..写真ピッカー
このデモでは、これら 2 つのクラスをチェックまたは参照するだけです。
メソッドのOverlayViewController.m
クラスでは、timedTakePhoto
次のような要件でタイマーを設定するだけです..
- (IBAction)timedTakePhoto:(id)sender
{
// these controls can't be used until the photo has been taken
self.cancelButton.enabled = NO;
self.takePictureButton.enabled = NO;
self.timedButton.enabled = NO;
self.startStopButton.enabled = NO;
if (self.cameraTimer != nil)
[self.cameraTimer invalidate];
_cameraTimer = [NSTimer scheduledTimerWithTimeInterval:0.03
target:self
selector:@selector(timedPhotoFire:)
userInfo:[NSNumber numberWithInt:kOneShot]
repeats:YES];
// set time with your requirement above
// start the timer to sound off a tick every 1 second (sound effect before a timed picture is taken)
if (self.tickTimer != nil)
[self.tickTimer invalidate];
_tickTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
target:self
selector:@selector(tickFire:)
userInfo:nil
repeats:YES];
}
これからアイデアを得て、このデモを要件に使用することもできます..
これがお役に立てば幸いです...