This file contains hidden or 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
xcode插件: | |
Alcatraz 管理第三方插件 | |
cocoapods-xcode-plugin | |
FuzzyAutocompletePlugin-master | |
KSImageNamed-Xcode-master |
This file contains hidden or 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
- (void)showLastImageForImageView:(UIImageView *)imageView | |
{ | |
ALAssetsLibraryAccessFailureBlock failureblock = ^(NSError *myerror){ | |
NSLog(@"相册访问失败 =%@", [myerror localizedDescription]); | |
if ([myerror.localizedDescription rangeOfString:@"Global denied access"].location!=NSNotFound) { | |
NSLog(@"无法访问相册.请在'设置->定位服务'设置为打开状态."); | |
}else{ | |
NSLog(@"相册访问失败."); |
This file contains hidden or 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 VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] | |
#define BUNDLEID [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] | |
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height | |
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width | |
#define IS_IOS7 (BOOL)([[[UIDevice currentDevice] systemVersion]floatValue]>=7.0 ? YES : NO) | |
#define IS_IOS8 (BOOL)([[[UIDevice currentDevice] systemVersion]floatValue]>=8.0 ? YES : NO) | |
#define ApplicationDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate) | |
#define WEAKSELF typeof(self) __weak weakSelf = self; |
This file contains hidden or 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
截屏 | |
UIGraphicsBeginImageContextWithOptions(pageView.page.bounds.size, YES, zoomScale); | |
[pageView.page.layer renderInContext:UIGraphicsGetCurrentContext()]; | |
UIImage *uiImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
图片加文字 | |
-(UIImage *)addText:(UIImage *)img text:(NSString *)text1 | |
{ | |
//上下文的大小 |
NewerOlder