随笔分类 - iOS-UI知识
摘要:可能是由于粘贴网页上的代码的时候两行之间的回车引起的,两行之间重新输入回车就行...。。。删掉重新写一遍就ok了
阅读全文
摘要:在Archive项目时,出现了“Your build settings specify a provisioning profile with the UUID “”, however, no such provisioning profile was found”的出错。一直提示指定UUID的pr
阅读全文
摘要:CocoaPods是什么? 当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等。可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,周而复始,可见手动一个个去下载所需类库十分麻烦。另外一种常见情况是,你项目中用到的类库有更新,你必须得
阅读全文
摘要:self.locationTimer =[NSTimer scheduledTimerWithTimeInterval: 0.01 target: self selector:@selector(transformAction) userInfo: nil repeats: YES];-(void)
阅读全文
摘要:调用一次计时器方法: //不重复,只调用一次。timer运行一次就会自动停止运行 self.locationTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector: @selector(LocationTimer)
阅读全文
摘要:iOS中plist的创建,数据写入与读取功能创建一个test.plist文件-(void)triggerStorage{ NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,Y
阅读全文
摘要:/设置按钮上的自体的大小//[btn setFont: [UIFont systemFontSize: 14.0]]; //这种可以用来设置字体的大小,但是可能会在将来的SDK版本中去除改方法//应该使用btn.titleLabel.font = [UIFont systemFontOfSize: ...
阅读全文
摘要://源Controller中跳转方法实现 MKDialogController *controller = [[MKDialogController alloc] init]; controller.modalTransitionStyle = UIModalTransitionStyleCross
阅读全文
摘要:PropertiesalwaysBounceHorizontal //一个布尔值,决定是否弹跳总是出现水平滚动时达到结束内容的看法。默认值是NO 。@property(nonatomic) BOOL alwaysBounceHorizontal //如果这个属性被设置为YES而且bounces的值是...
阅读全文
摘要:创建当前时间[cpp]view plaincopyprint?NSDate*date=[NSDatedate];从现在开始的24小时 NSTimeIntervala_day =24*60*60; NSDate*tomorrow = [NSDatedateWithTimeIntervalSin...
阅读全文
摘要:在使用日历使用中,获取星期的时候NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];[dateFormat setDateFormat:@"EEE"];得到的String 是 “Mon” “Wed”....如果想要得到中文 “周一...
阅读全文
摘要:获取文字 button.currentTitle更多如下:@property(nullable, nonatomic,readonly,strong) NSString *currentTitle; // normal/highlighted/selected/disabled. can...
阅读全文
摘要://将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;//将像素point从view中转换到当前视图中,返回在当前视图中的像素值- (...
阅读全文
摘要:iOS5.0以后就开始可以使用ARC来代替之前的MRC。1.ARC中使用MRC的类。方法如下:在targets的build phases选项下Compile Sources下选择要不使用arc编译的文件,双击它,输入-fno-objc-arc即可2.MRC中使用ARC的类。方法如下:在targets...
阅读全文
摘要:好几次用到了NSIndexPath,但是一直不知道怎么通过 row section这两个参数来初始化NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:4];直接使用!
阅读全文
摘要:汇总一下我的解决过程供参考,欢迎指正和补充。解决方案一:参考该博客:http://blog.sina.com.cn/s/blog_85c1f6a50100zxz1.html解决方案二:方案一中的步骤执行完成后不起作用,查看钥匙串中的证书是否有重复,如果有重复删除重复的证书,然后clean&bulid...
阅读全文
摘要:0. enablesReturnKeyAutomatically默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的。1.borderStyle设置边框样式,只有设置了才会显示边框样式 text.borderStyle = UITextBorderSt...
阅读全文
摘要:NSString+URLEncoding.h#import @interface NSString(URLEncoding)- (NSString *)urlEncodeString;@endNSString+URLEncoding.m#import "NSString+URLEncoding.h"...
阅读全文
摘要:我之前写过一篇博客,介绍缓存处理的三种方式,其中最难,最麻烦,最占内存资源的还是图片缓存,最近做的项目有大量的图片处理,还是采用了SDWebImage来处理,但是发现之前封装好的代码报错了。研究发现,是我用了新版的SDWebImage,好多方法都变了。现在把代码贴出来,供大家参考。尤其是新手,看完这...
阅读全文

浙公网安备 33010602011771号