摘要:ViewController: QRView.h: QRView.m #import "QRView.h" #import <AVFoundation/AVFoundation.h> /** * 具备二维码扫描的功能 */ @interface QRView () <AVCaptureMetadat
阅读全文
摘要:#import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLo...
阅读全文
摘要:#import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIProgressView *progressView; - (IBAction)download:(UIButton *)sender; @property (nonatomic, strong) NS...
阅读全文
摘要:#import "SZMViewController.h" @interface SZMViewController () @end @implementation SZMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading t...
阅读全文
摘要:// 创建视频资源对象 AVAsset *asset = [AVAsset assetWithURL:self.mpc.contentURL]; // 视频图片生成器对象 AVAssetImageGenerator *generator = [AVAssetImageGenerator assetI
阅读全文
摘要://将数组里的数据进行反转 NSArray *reverse = [self.childMenus reverseObjectEnumerator].allObjects;
阅读全文
摘要:/* * 判断字符串 中文字符 字母 数字 以及下划线 */-(BOOL)isChineseCharacterAndLettersAndNumbersAndUnderScore:(NSString *)string{ NSUInteger len = [string length]; for(int
阅读全文
摘要:NSDate类用于保存时间值,同时提供了一些方法来处理一些基于秒级别时差(Time Interval)运算和日期之间的早晚比较等。 1. 创建或初始化可用以下方法 用于创建NSDate实例的类方法有 + (id)date; 返回当前时间 + (id)dateWithTimeIntervalSince
阅读全文