IOS
文章平均质量分 50
yishu_jay
这个作者很懒,什么都没留下…
展开
-
IOS 实现可移动拖拽的View
在一个大的view中,某个view元素可以在该view中自由拖动,但是不能超出该大view范围。首先添加拖动Gesture: UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(dragReplyButto原创 2013-08-05 13:25:10 · 2484 阅读 · 0 评论 -
IOS中获取各种文件的目录路径的方法
iphone沙箱模型的有四个文件夹,分别是什么,永久数据存储一般放在什么位置,得到模拟器的路径的简单方式是什么.documents,tmp,app,Library。(NSHomeDirectory()),手动保存的文件在documents文件里Nsuserdefaults保存的文件在tmp文件夹里1、Documents 目录:您应该将所有de应用程序数据转载 2013-10-23 21:55:34 · 759 阅读 · 0 评论 -
iOS 7 教程:定制iOS 7中的导航栏和状态栏
定制iOS 7中的导航栏和状态栏转载 2014-02-21 11:08:26 · 398 阅读 · 0 评论 -
ALAssetsLibrary详解(转)
http://blog.csdn.net/kingsley_cxz/article/details/9165951转载 2014-02-13 18:01:38 · 481 阅读 · 0 评论 -
IOS 发送短信实现
链接一链接二转载 2014-02-20 12:58:04 · 513 阅读 · 0 评论 -
自定义使用AVCaptureSession 拍照,摄像,载图
http://www.cnblogs.com/liangzhimy/archive/2012/10/26/2740905.htmlhttp://chenweihuacwh.iteye.com/blog/734229http://blog.csdn.net/guo_hongjun1611/article/details/7992294http://blog.csdn.net/xi转载 2014-05-21 11:12:26 · 523 阅读 · 0 评论 -
UIImageOrientation 映射关系
http://www.tanhao.me/pieces/1019.html转载 2014-05-29 11:51:45 · 582 阅读 · 0 评论 -
关于UIView的autoresizingMask属性的研究
点击打开链接在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高。123456789enum { UIViewAutoresizingNone转载 2014-08-12 14:44:53 · 396 阅读 · 0 评论 -
xcode5中的Provisioning Profile位置
xcode5 provisioning profile path: ~/Library/MobileDevice/Provisioning Profiles转载 2014-09-12 10:21:13 · 517 阅读 · 0 评论 -
Xcode import文件时无法找到同级其他目录的文件解决办法
project --> build settings --> User Header Search Paths 添加 $(SRCROOT)转载 2014-09-01 14:41:22 · 2619 阅读 · 0 评论 -
IOS 动画效果
UIView的,翻转、旋转,偏移,翻页,缩放,取反的动画效果翻转的动画//开始动画 [UIView beginAnimations:@"doflip" context:nil];//设置时常 [UIView setAnimationDuration:1];//设置动画淡入淡出 [UIView setAnimationCurve:UIViewAnimationC转载 2013-10-29 14:23:03 · 584 阅读 · 0 评论 -
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 · 455 阅读 · 0 评论 -
IOS图片拉伸的几种方法
系统至ios6之后,关于图片拉伸的方法已经扩展至3个函数: 1.ios4提供的方法: - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight 这个函数是UIImage的一个实例函数,它的功能是创建一个内容可拉伸,转载 2013-08-13 14:05:25 · 648 阅读 · 0 评论 -
IOS 获取系统字体
首先获得ios系统中的所有family字体,然后根据family字体得到所有的子字体。 NSArray *arr = [UIFontfamilyNames]; for (NSString *familyFont in arr) { NSLog(@"familyName is %@", familyFont); NSArray *son原创 2013-08-02 17:24:03 · 1364 阅读 · 0 评论 -
IOS UIImageview 添加边框 或者设置成圆角
//设置layerCALayer *layer=[backView layer];//是否设置边框以及是否可见[layer setMasksToBounds:YES];//设置边框圆角的弧度[layer setCornerRadius:0];//设置边框线的宽//[layer setBorderWidth:1];//设置边框线的颜色[layer setBorderColor:[转载 2013-08-20 13:20:02 · 2116 阅读 · 0 评论 -
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 · 656 阅读 · 0 评论 -
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 · 473 阅读 · 0 评论 -
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 · 600 阅读 · 0 评论 -
iOS6的旋屏控制 不同以前版本
iOS 6 中转屏API的改变-UINavigationControlleriOS6的旋屏控制 不同以前版本转载 2013-10-05 11:07:31 · 439 阅读 · 0 评论 -
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 · 2589 阅读 · 0 评论 -
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 · 730 阅读 · 0 评论 -
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.csdn.net/coolypf/article/details/8569813http://blog转载 2013-09-24 15:27:12 · 478 阅读 · 0 评论 -
UITableView 优化
在iOS App中,UITableView应该是使用率最高的,同时也是最为复杂的视图。 几乎所有自带的应用中都能看到它的身影,可见它的重要性。在使用UITableView时,会经常遇到性能上的问题,普遍表现在滚动时比较卡,特别是table cell中包含图片的情况时。实际上只要针对性地优化一下,这种问题就不会有了。有兴趣的可以看看LazyTableImages这个官方的例子程序,虽然也转载 2014-12-16 17:11:17 · 401 阅读 · 0 评论