- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在创建一个照片拍摄应用程序,用户可以在其中一秒钟拍摄多达 20 张照片。我已经尝试过苹果的 AVCam 示例代码,但它不允许以 20 FPS 的速度拍摄静止图像。
有没有其他方法可以以这种速度拍照。
最佳答案
查看此演示.. Photo Picker
在此演示中,只需检查或引用这两个类..
在 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];
}
希望您能从中得到启发,并根据您的要求使用此演示..
希望对你有帮助...
关于iphone - 如何使用objective c在一秒钟内拍摄并保存20张照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13718225/
有什么办法(使用CSS)在最后一步之后将 Sprite 暂停一秒或多秒?我尝试再添加一个步骤或将相同的背景位置从 80% 增加到 100%,但没有成功。 .sprite { animation:
我正在使用 Flutter 创建一个新应用,并想在初始启动画面上添加自定义图像。 图像出现在初始屏幕上,但是在大约半秒钟内它看起来被拉伸(stretch)了,看起来不太好。 我一直在寻找,但一直找不到
我有一个状态: state = { showView: false, } 如何创建一个函数,在调用时将 showView 状态更改为 true 1 秒,然后将其更改回 false? 最佳答案 this
我有一个平滑的滚动效果: jQuery('html,body').animate({scrollTop:scrollTarget}, 1000, "swing"); 它工作正常,但是当按下多个元素时,
我似乎遇到了与我之前发布的问题相同的问题。我想隐藏默认情况下存在的所有 div,只显示一个。然后用户可以单击一个侧面选项卡以显示另一个。问题是 div 在页面加载后仅隐藏一秒钟,但很快就会重新出现。这
我是一名优秀的程序员,十分优秀!