- 博客(17)
- 收藏
- 关注
原创 [iOS-GQiang]时间戳
// 当前时间戳精确到秒 - (NSString *)_loadgGetTimeNow { //获取系统当前的时间戳 NSDate *dat = [NSDate dateWithTimeIntervalSinceNow:0]; NSTimeInterval a = [dat timeIntervalSince1970] * 1000; NSString *timeS
2015-03-12 11:18:45
377
原创 [iOS-GQiang]分割字符串变成数组方法
// 分割字符串变成数组的方法 - (NSArray *)strSeparated:(NSString*)_ptr{ return [_ptr componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@","]]; }
2015-03-12 11:18:44
596
原创 [iOS-GQiang]UIImageView 播放几张图片
// 在数组中放置几张图片 NSMutableArray *ImageArray = [NSMutableArray array]; _ImageView = [[UIImageView alloc] initWithFrame:CGRectMake(148, 200, 22, 22)]; _ImageView.animationImages = bflies;
2015-03-12 11:13:58
441
转载 [iOS-GQiang]NSMutabArray 排序
NSMutableArray* arr = [NSMutableArrayarrayWithObjects: [NSNumber numberWithInt:0], [NSNumber numberWithInt:3], [N
2014-12-03 17:36:00
462
转载 [iOS-GQiang]iOS md5加密
首先倒入库#import //md5 16位加密 (小写) -(NSString *)md5:(NSString *)str { const char *cStr = [str UTF8String]; unsigned char result[16]; CC_MD5(cStr, strlen(cStr), result); NSMutableStrin
2014-11-27 17:19:29
392
转载 [iOS-GQiang]IOS下利用ziparchive解压缩zip文件
ziparchive是基于开源代码”MiniZip”的zip压缩与解压的Objective-C 的Class,使用起来非常的简单 方法:从http://code.google.com/p/ziparchive/ 上下载ZipArchive.zip,解压后将代码加入工程中,并且把libz.dylib库添加到工程中 使用方法: 1. 压缩:ZipArchive可以压缩多个文件,只需要把文件一
2014-11-26 15:04:22
400
原创 [iOS-GQiang]改变状态栏文字颜色
在 info 文件中添加 View controller-based status bar appearance 字段 设置wei
2014-11-19 09:31:16
431
原创 [iOS-GQiang]iOS SVPullRefresh 开源上拉加载使用方法。
// 上拉加载 - (void)setTableView { [_tableView addPullToRefreshWithActionHandler:^{ addI++; [self _requestData]; }position:SVPullToRefreshPositionBo
2014-11-15 17:47:55
735
原创 [iOS-GQiang]iOS UITextField收起键盘
// 收起键盘 [textField resignFirstResponder];
2014-11-15 17:41:50
499
原创 [iOS-GQiang]iOS获取当前时间
// 获取当前时间 NSDate *senddate = [NSDate date]; NSDateFormatter *dateformatter = [[NSDateFormatter alloc] init]; [dateformatter setDateFormat:@"YYYYMMdd"]; NSString * locat
2014-11-15 17:34:34
375
原创 [iOS-GQiang]注册推送通知方法
判断是否是真机 if (TARGET_OS_IPHONE) { // 注册推送通知 [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge |
2014-11-15 10:31:36
523
转载 [iOS-GQiang]三种线程创建
1、简介: 1.1 iOS有三种多线程编程的技术,分别是: 1.、NSThread 2、Cocoa NSOperation (iOS多线程编程之NSOperation和NSOperationQueue的使用) 3、GCD 全称:Grand Central Dispatch( iOS多线程编程之Grand Central Dispatch(GCD)介绍和使用) 这三
2014-11-15 10:12:02
422
原创 [iOS-GQiang]创建线程
//通过NSThread创建线程(参数1:方法的执行者;参数2:在线程中执行的方法;参数3:用于传递参数) //第一步:创建线程 NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(banZhuanPlus) object:nil]; //第二步:执行 [thread start]; [thread
2014-11-15 10:10:37
414
原创 [iOS-GQiang]拨打电话
-(void)CallPhone{ NSString *phoneNum = @"***********";// 电话号码 NSURL *phoneURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",phoneNum]]; if (!_phoneCallWebView) {
2014-11-15 09:42:03
330
原创 [iOS-GQiang]iOS app内发送短信
- (IBAction)actionButton:(id)sender { if( [MFMessageComposeViewController canSendText] ){ MFMessageComposeViewController * controller = [[MFMessageComposeViewController a
2014-11-15 09:38:44
453
转载 [iOS-GQiang]AsyncSocket
iPhone的标准推荐是CFNetwork 库编程,其封装好的开源库是 cocoa AsyncSocket库,用它来简化CFNetwork的调用,它提供了异步操作 主要特性有: 队列的非阻塞的读和写,而且可选超时。你可以调用它读取和写入,它会当完成后告知你自动的socket接收。如果你调用它接收连接,它将为每个连接启动新的实例,当然,也可以立即关闭这些连接委
2014-11-15 09:23:35
494
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅