摘要: 在 《iOS面试题集锦(附答案)》 中有这样一道题目: 在block内如何修改block外部变量?(38题)答案如下: 默认情况下,在block中访问的外部变量是复制过去的,即:写操作不对原变量生效。但是你可以加上 __block 来让其写操作生效,示例代码如下: __block int a = 0 阅读全文
posted @ 2016-05-24 18:04 FMDN 阅读(3703) 评论(0) 推荐(0)
摘要: #import #import #import @interface ViewController : UIViewController @property (strong, nonatomic) AVCaptureSession *captureSession; @property (strong, nonatomic) AVCaptureDeviceInput *videoInpu... 阅读全文
posted @ 2016-05-24 14:04 FMDN 阅读(1434) 评论(0) 推荐(0)
摘要: #import #import @interface ViewController : UIViewController @property (nonatomic,strong) AVCaptureSession * captureSession; @property (nonatomic,strong) AVCaptureDeviceInput * videoInput; @end ... 阅读全文
posted @ 2016-05-24 13:32 FMDN 阅读(829) 评论(0) 推荐(0)
摘要: - (IBAction)takePicture:(id)sender { // Make sure camera is available if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == NO) { ... 阅读全文
posted @ 2016-05-24 09:47 FMDN 阅读(433) 评论(0) 推荐(0)