- 博客(20)
- 收藏
- 关注
原创 比较两个日期的方法
-(int)compareOneDay:(NSString *)oneDay withAnotherDay:(NSString *)anotherDay{ NSDateFormatter* dateFormat = [[NSDateFormatteralloc] init];//实例化一个NSDateFormatter对象 [dateFormat setDateForm
2015-08-31 15:50:11 395
原创 ios 应用 跳转App Store 评论 评分
if ([[[UIDevicecurrentDevice] systemVersion]floatValue]>7) { [[UIApplicationsharedApplication] openURL:[NSURLURLWithString:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa
2015-08-21 14:21:40 440
原创 ios oc 判断输入的数是否是另一个的整数倍
-(BOOL)judgeStr:(NSString *)str1 with:(NSString *)str2{ int a=[str1intValue]; double s1=[str2doubleValue]; int s2=[str2intValue]; if (s1/a-s2/a>0) { return
2015-08-11 09:59:41 5373
原创 ios 版本更新
NSDictionary *infoDict = [[NSBundlemainBundle] infoDictionary]; NSString *currentVersion = [infoDictobjectForKey:@"CFBundleVersion"]; double doubleCurrentVersion = [currentVersiondoubl
2015-08-03 16:26:50 432
原创 GCD的简单使用
dispatch_async(dispatch_get_global_queue(0,0), ^{ NSLog(@"后台执行"); }); dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"主线程执行"); }); staticdisp
2015-06-25 14:49:58 415
原创 UIWebView可以显示的文档
1.Excel(.xls)2.Keynote(.key.zip)3.Numbers(.numbers.zip)4.Pages(.pages.zip)5.PDF(.pdf)6.Powerpoint(.ppt)7.Word(.doc)NSString *path = [[NSBundle mainBundle] pathForResource:@"xxx
2015-06-25 14:42:03 275
原创 ios textfield 输入限制
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ if (textField.tag==11) { NSString * toBeString = [te
2015-05-25 19:03:30 365
原创 AFNetWoring 设置超时时间
AFHTTPRequestOperationManager *ma=[AFHTTPRequestOperationManagermanager]; [ma.requestSerializerwillChangeValueForKey:@"timeoutInterval"]; ma.requestSerializer.timeoutIn
2015-05-25 19:01:47 1593
原创 ios 处理图片固定其方向的一个方法
- (UIImage *)makeThumbnailFromImage:(UIImage *)srcImage scale:(double)imageScale{ UIImage *thumbnail =nil; CGSize imageSize =CGSizeMake(srcImage.size.width * imageScale, sr
2015-05-25 18:56:23 417
原创 ios 不能横屏
#pragma mark --不能横屏-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ returnUIInterfaceOrientationMaskPortrait;}
2015-05-25 18:51:24 518
原创 ios 设置启动页面的时间
BOOL done;-(void)timerFired:(NSTimer *)timer{ done=YES;}NSTimer *connectionTimer=[NSTimerscheduledTimerWithTimeInterval:1.0target:selfselector:@selector(timerFired:)use
2015-05-25 18:48:52 370
原创 关于ios工程大小的问题
创建工程时会提示有create local git repository for this project的复选框,如果勾上的话就是使用Xcode的git功能,它是一个隐藏文件夹,并且在Xcode中删除资源文件的话不会自动删除git文件夹里的内容,所以工程还是那么大呵呵!!!!!!!!
2015-04-01 16:11:06 297
原创 ios AfNetWoring 上传多张图片
AFHTTPRequestOperationManager *manager=[AFHTTPRequestOperationManagermanager]; //设置返回的数据解析格式 manager.responseSerializer.acceptableContentTypes= [NSSet setWithObject:@"text/html
2015-01-19 16:50:39 2326
原创 iOS UITableView实现滑动删除、增加、多选
实现滑动删除,动态增加,以及cell的多选只需要添加cell 的三个代理函数。1.这个函数是判断每一个cell是否可编辑-(BOOL)tableView:(UITableView*)tableView canEditRowAtIndexPath:(NSIndexPath*)indexPath2.这个函数是返回编辑的类型-(UITableViewCellEditingStyl
2015-01-19 16:47:56 509
原创 iOS AFNetWoring单张上传图片
AFHTTPRequestOperationManager *ma = [AFHTTPRequestOperationManagermanager]; ma.responseSerializer.acceptableContentTypes =[NSSetsetWithObject:@"text/html"]; [ma POST:[m
2015-01-19 16:33:56 523
原创 iOS 加载本地html
self.webView = [[UIWebViewalloc]initWithFrame:CGRectMake(0,66, W,self.view.frame.size.height-66)]; NSString *mainBundleDirectory=[[NSBundlemainBundle] bundlePath]; NSString *pa
2015-01-19 16:10:36 319
原创 iOS UIImageView设置多张图片
NSArray *ary=[[NSArrayalloc]initWithObjects:[UIImageimageNamed:@"yy1"],[UIImageimageNamed:@"yy2"],[UIImageimageNamed:@"yy3"],nil]; UIImageView *im=[UIImageView alloc]initWithFra
2015-01-19 15:46:43 892
原创 ios 调用系统通讯录
首先添加系统库 1、AddressBook.framework2、AddressBookUI.framework添加头文件和协议1、2、3、ABPeoplePickerNavigationControllerDelegate创建 ABPeoplePickerNavigationController *peoplePicker = [[ABPeoplePic
2015-01-19 15:32:50 450
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人