会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
xiao孛
博客园
首页
博问
闪存
新随笔
订阅
管理
上一页
1
···
5
6
7
8
9
2015年10月20日
ios 获取当前时间
摘要: 1.第一种返回的时间是一个整个的字符串。1 NSDate *timeDate = [NSDate date];2 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];3 [dateFormatter ...
阅读全文
posted @ 2015-10-20 15:08 xiao孛
阅读(523)
评论(0)
推荐(0)
编辑
2015年10月15日
本地推送UILocalNotification的一些简单方法
摘要: 1.添加本地推送,需要在app添加推送。可以根据通知的userInfo的不同的键值对来区分不同的通知 UILocalNotification *notification = [[UILocalNotification alloc] init]; if(notification) { notifica
阅读全文
posted @ 2015-10-15 17:21 xiao孛
阅读(317)
评论(0)
推荐(0)
编辑
2015年10月14日
利用定时器展示动态文字
摘要: 1 #import "ViewController.h" 2 3 static NSInteger count = 0; 4 5 @interface ViewController () 6 7 @property (weak, nonatomic) IBOutlet UILabel *la...
阅读全文
posted @ 2015-10-14 15:16 xiao孛
阅读(373)
评论(0)
推荐(0)
编辑
2015年10月13日
__block的初步用法
摘要: 再block中使用 self 时,要在前面加上__block。防止在block中用到self时把self对象retain, 造成内存泄露。__block UIViewController *safeSelf = self;[{ safeSelf.button = button; // __bloc...
阅读全文
posted @ 2015-10-13 15:12 xiao孛
阅读(301)
评论(0)
推荐(0)
编辑
2015年9月25日
iOS 网络操作与AFNetworking
摘要: 一、早前的几个网络框架1、ASI框架:HTTP终结者.很牛,但是有BUG,已经停止更新.2、MKNetworkKit(印度人写的).3、AFN一直还在更新.AFNetworking的出现:MAC/iOS设计的一套网络框架.(为了简化网络操作)地址:https://github.com/AFNetwo...
阅读全文
posted @ 2015-09-25 10:57 xiao孛
阅读(264)
评论(0)
推荐(0)
编辑
2015年9月21日
字符串相互转换打印
摘要: 1.在非调试状态下NSLog不工作#ifdef DEBUG#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...)#endif2.去掉打印的时间戳#ifdef DEBUG#define NSLog(FORMAT, ...) fprint...
阅读全文
posted @ 2015-09-21 16:21 xiao孛
阅读(274)
评论(0)
推荐(0)
编辑
2015年9月15日
简单的数据存储
摘要: > 1.简单的存储字符串,状态,数据类型// 存储数据NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];// 字符串- (void)setObject:(id)value forKey:(NSString *)defau...
阅读全文
posted @ 2015-09-15 18:41 xiao孛
阅读(209)
评论(0)
推荐(0)
编辑
Xcode的路径小知识纪录
摘要: Xcode的路径小知识纪录模拟器应用程序的安装路径/Users/aplle/资源库/Application Support/iPhone Simulator/7.1/ApplicationsXcode文档安装路径/Applications/Xcode.app/Contents/Developer/D...
阅读全文
posted @ 2015-09-15 18:39 xiao孛
阅读(217)
评论(0)
推荐(0)
编辑
定时器NSTimer
摘要: /** 添加定时器 */@property (nonatomic, strong) NSTimer *timer;- (void)addTimer{ // 2秒后,自己 调用nextImage方法 nil 一直循环这个定时器 self.timer = [NSTimer scheduled...
阅读全文
posted @ 2015-09-15 18:36 xiao孛
阅读(151)
评论(0)
推荐(0)
编辑
弹框alertView
摘要: // 创建一个弹框UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@“标题” message:@“显示的具体内容” delegate:self cancelButtonTitle:@“取消” otherButtonTitle:@“确定”...
阅读全文
posted @ 2015-09-15 18:32 xiao孛
阅读(287)
评论(0)
推荐(0)
编辑
上一页
1
···
5
6
7
8
9