2015年9月22日

NSSearchPathForDirectoriesInDomains用法

摘要: 1.iPhone会为每一个应用程序生成一个私有目录,这个目录位于:/Users/sundfsun2009/Library/Application Support/iPhone Simulator/User/Applications下,并随即生成一个数字字母串作为目录名,在每一次应用程序启动时,这个字... 阅读全文

posted @ 2015-09-22 17:11 Baymax01 阅读(251) 评论(0) 推荐(0) 编辑

查询是否有权限访问相机和相册

摘要: +(BOOL)getSystemPhotoAuthority{ BOOL agree=NO; AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVi... 阅读全文

posted @ 2015-09-22 17:05 Baymax01 阅读(224) 评论(0) 推荐(0) 编辑

iOS推送

摘要: 1.注册推送- (BOOL)pushNotificationOpen{ if (isAfterIOS8) { UIUserNotificationType types = [[UIApplication sharedApplication] currentUserNotif... 阅读全文

posted @ 2015-09-22 14:41 Baymax01 阅读(155) 评论(0) 推荐(0) 编辑

第三方分享(新浪,微信,QQ)

摘要: 1.去各个平台下载ShareSDK,并注册[WXApi registerApp:WEIXINAPPID]; [WeiboSDK registerApp:WEIBOkey];View Code2.AppDelegate文件-(BOOL)application:(UIApplication *)a... 阅读全文

posted @ 2015-09-22 14:35 Baymax01 阅读(216) 评论(0) 推荐(0) 编辑

2015年9月13日

pop动画

摘要: #import "ViewController.h"#import "POP.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; ... 阅读全文

posted @ 2015-09-13 20:50 Baymax01 阅读(875) 评论(0) 推荐(0) 编辑

CoreData的用法

摘要: #import "ViewController.h"#import "Student.h"@interface ViewController (){ NSArray *_dataArray; //负责应用与数据库交互 NSManagedObjectContext *_context... 阅读全文

posted @ 2015-09-13 20:45 Baymax01 阅读(173) 评论(0) 推荐(0) 编辑

高德地图详细使用方法

摘要: 1.简单定位 - (void)viewDidLoad { [super viewDidLoad]; _mapView.showsUserLocation = YES; [_mapView setUserTrackingMode:MAUserTrackingModeFollow]; } - (void 阅读全文

posted @ 2015-09-13 20:43 Baymax01 阅读(5149) 评论(0) 推荐(0) 编辑

GDataXML配置过程

摘要: GDataXML配置过程: (1).引入GDataXML(2个文件) .对GDataXML.m增加非arc注释 -fno-objc-arc(2).添加系统库 libxml2.dylib (3).Header Search Paths中添加 /usr/include/libxml2 阅读全文

posted @ 2015-09-13 20:31 Baymax01 阅读(137) 评论(0) 推荐(0) 编辑

图片懒加载(仿SDWebImage)

摘要: 1.图片缓存#import "UIImageView+WebCache.h"#import "ImageDownloader.h"@implementation UIImageView (WebCache)- (void)setImageWithUrl:(NSString *)urlStr andP... 阅读全文

posted @ 2015-09-13 20:27 Baymax01 阅读(304) 评论(0) 推荐(0) 编辑

GCD创建单例

摘要: //单例,+方法不能调用成员变量及属性 + (instancetype)sharedManager { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ if (!_manager) { _manager = [[ImageDownloaderManager all... 阅读全文

posted @ 2015-09-13 20:22 Baymax01 阅读(121) 评论(0) 推荐(0) 编辑

导航