This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define IS_RETINA ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] && ([UIScreen mainScreen].scale == 2.0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *imageUrl = [NSURL URLWithString:couponInfo.usingUrl]; | |
NSData *imageData = [[NSData alloc] initWithContentsOfURL:imageUrl]; | |
_avatar.image = [UIImage imageWithData:imageData]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 检测是否存在摄像头 | |
- (BOOL)isCameraAvailable | |
{ | |
return [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]; | |
} | |
// 检测前置摄像头是否存在 | |
- (BOOL)isFrontCameraAvailabel | |
{ | |
#ifdef __IPHONE_4_0 // iPhone加入了前置摄像头 |