- 博客(24)
- 收藏
- 关注
转载 UITableView 优化
在iOS App中,UITableView应该是使用率最高的,同时也是最为复杂的视图。 几乎所有自带的应用中都能看到它的身影,可见它的重要性。在使用UITableView时,会经常遇到性能上的问题,普遍表现在滚动时比较卡,特别是table cell中包含图片的情况时。实际上只要针对性地优化一下,这种问题就不会有了。有兴趣的可以看看LazyTableImages这个官方的例子程序,虽然也
2014-12-16 17:11:17
424
转载 xcode5中的Provisioning Profile位置
xcode5 provisioning profile path: ~/Library/MobileDevice/Provisioning Profiles
2014-09-12 10:21:13
555
转载 Xcode import文件时无法找到同级其他目录的文件解决办法
project --> build settings --> User Header Search Paths 添加 $(SRCROOT)
2014-09-01 14:41:22
2715
转载 关于UIView的autoresizingMask属性的研究
点击打开链接在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高。123456789enum { UIViewAutoresizingNone
2014-08-12 14:44:53
436
转载 自定义使用AVCaptureSession 拍照,摄像,载图
http://www.cnblogs.com/liangzhimy/archive/2012/10/26/2740905.htmlhttp://chenweihuacwh.iteye.com/blog/734229http://blog.youkuaiyun.com/guo_hongjun1611/article/details/7992294http://blog.youkuaiyun.com/xi
2014-05-21 11:12:26
541
转载 ALAssetsLibrary详解(转)
http://blog.youkuaiyun.com/kingsley_cxz/article/details/9165951
2014-02-13 18:01:38
505
转载 IOS 动画效果
UIView的,翻转、旋转,偏移,翻页,缩放,取反的动画效果翻转的动画//开始动画 [UIView beginAnimations:@"doflip" context:nil];//设置时常 [UIView setAnimationDuration:1];//设置动画淡入淡出 [UIView setAnimationCurve:UIViewAnimationC
2013-10-29 14:23:03
617
转载 IOS中获取各种文件的目录路径的方法
iphone沙箱模型的有四个文件夹,分别是什么,永久数据存储一般放在什么位置,得到模拟器的路径的简单方式是什么.documents,tmp,app,Library。(NSHomeDirectory()),手动保存的文件在documents文件里Nsuserdefaults保存的文件在tmp文件夹里1、Documents 目录:您应该将所有de应用程序数据
2013-10-23 21:55:34
829
转载 IOS GCD使用
Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。dispatch queue分成以下三种:1)运行在主线程的Main queue,通过dispatch_get_main_queue获取。/*!* @function dispatch_get_main_queue** @abstract* Returns the
2013-10-18 10:22:05
477
原创 IOS 整数取个十百位数
+ (NSInteger)getUnits:(NSInteger)targetInt { NSString *strNum = [NSString stringWithFormat:@"%d", targetInt]; NSString *resultStr = [strNum substringWithRange:NSMakeRange(strNum.length - 1, 1)
2013-10-06 15:33:40
2643
转载 IOS 随机数
ios 有如下三种随机数方法:1. srand((unsigned)time(0)); //不加这句每次产生的随机数不变 int i = rand() % 5; 2. srandom(time(0)); int i = random() % 5;3. int i = arc4random() % 5 ; 注:rand
2013-10-06 15:06:05
788
转载 IOS math.h函数
1、 三角函数 double sin (double);正弦 double cos (double);余弦 double tan (double);正切 2 、反三角函数 double asin (double); 结果介于[-PI/2, PI/2] double acos (double); 结果介于[0, PI] double atan (double
2013-10-04 18:22:01
628
转载 IOS 地图坐标转换相关
http://www.keakon.net/2011/07/02/WGS84%E5%9D%90%E6%A0%87%E8%BD%AC%E7%81%AB%E6%98%9F%E5%9D%90%E6%A0%87%EF%BC%88iOS%E7%AF%87%EF%BC%89http://blog.youkuaiyun.com/coolypf/article/details/8569813http://blog
2013-09-24 15:27:12
509
转载 IOS 颜色渐变
+ (UIImage*) drawGradientInRect:(CGSize)size withColors:(NSArray*)colors { NSMutableArray *ar = [NSMutableArray array]; for(UIColor *c in colors) [ar addObject:(id)c.CGColor]; UIGra
2013-09-10 11:25:49
499
转载 IOS检测网络连接状态
使用之前请从Apple网站下载示例:点此下载然后将Reachability.h 和 Reachability.m 加到自己的项目中,并引用 SystemConfiguration.framework,就可以使用了。Reachability 中定义了3种网络状态:// the network state of the device for Reachability 1.5.
2013-08-29 13:26:49
703
转载 IOS 图片处理成圆形
#import @interface UIImage (Rounded)+ (id)createRoundedRectImage:(UIImage*)image size:(CGSize)size radius:(NSInteger)r;@end#import "UIImage+Rounded.h"@implementation UIImage (Rounded)s
2013-08-26 10:19:34
891
转载 IOS UIImageview 添加边框 或者设置成圆角
//设置layerCALayer *layer=[backView layer];//是否设置边框以及是否可见[layer setMasksToBounds:YES];//设置边框圆角的弧度[layer setCornerRadius:0];//设置边框线的宽//[layer setBorderWidth:1];//设置边框线的颜色[layer setBorderColor:[
2013-08-20 13:20:02
2154
转载 IOS图片拉伸的几种方法
系统至ios6之后,关于图片拉伸的方法已经扩展至3个函数: 1.ios4提供的方法: - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight 这个函数是UIImage的一个实例函数,它的功能是创建一个内容可拉伸,
2013-08-13 14:05:25
675
原创 IOS 实现可移动拖拽的View
在一个大的view中,某个view元素可以在该view中自由拖动,但是不能超出该大view范围。首先添加拖动Gesture: UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(dragReplyButto
2013-08-05 13:25:10
2549
原创 IOS 获取系统字体
首先获得ios系统中的所有family字体,然后根据family字体得到所有的子字体。 NSArray *arr = [UIFontfamilyNames]; for (NSString *familyFont in arr) { NSLog(@"familyName is %@", familyFont); NSArray *son
2013-08-02 17:24:03
1441
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人