上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页

2013年4月3日

iOS中识别手机摇晃事件--skake手势

摘要: 晃一下手机,就能搜索出一堆在旁边的陌生人,这样的方法我们经常见过,怎么实现的呢。有两种方法。方法一// Ensures the shake is strong enough on at least two axes before declaring it a shake.// "Strong enough" means "greater than a client-supplied thresho... 阅读全文

posted @ 2013-04-03 09:29 流れ星ーー 阅读(543) 评论(0) 推荐(0) 编辑

CoreMotion--iOS中的陀螺仪用法

摘要: ios中有一个陀螺仪模块,CoreMotion下面使用例子 //初始化CoreMotion#import CMMotionManager *motionManager = [[CMMotionManager alloc]init]; //1. Accelerometer 获取手机加速度数据CMAccelerometerData *newestAccel = motionManager.a... 阅读全文

posted @ 2013-04-03 09:24 流れ星ーー 阅读(310) 评论(0) 推荐(0) 编辑

2013年3月28日

NSLog格式化输出

摘要: NSLog支持的输出格式列表如下%@ 对象%d, %i 整数%u 无符整形%f 浮点/双字%x, %X 二进制整数%o 八进制整数%zu size_t%p 指针%e 浮点/双字 (科学计算)%g 浮点/双字 %s C 字符串%.*s Pascal字符串%c 字符%C unichar... 阅读全文

posted @ 2013-03-28 11:31 流れ星ーー 阅读(87) 评论(0) 推荐(0) 编辑

弹出式日历源代码--PMCalendar

摘要: 载自https://github.com/kovpas/PMCalendar可以在界面的任何位置弹出的日历。下载:下载源代码 阅读全文

posted @ 2013-03-28 11:26 流れ星ーー 阅读(118) 评论(0) 推荐(0) 编辑

2013年3月25日

可调整内边距的UILabel

摘要: 继承UILabel,重载drawTextInRect方法。//1.header file#import @interface InsetsLabel : UILabel@property(nonatomic) UIEdgeInsets insets;-(id) initWithFrame:(CGRect)frame andInsets: (UIEdgeInsets) insets;-(id) in... 阅读全文

posted @ 2013-03-25 16:01 流れ星ーー 阅读(195) 评论(0) 推荐(0) 编辑

2013年3月22日

简单的正则表达式方法字符串替换

摘要: 做法使用 NSMutableString 的replaceOccurrencesOfString方法下面例子,把字符串中的数字都替换做0title=@"test123 test";NSMutableString *mutableStr = [NSMutableString stringWithString:title];[mutableStr replaceOccurrencesOfStrin... 阅读全文

posted @ 2013-03-22 15:49 流れ星ーー 阅读(143) 评论(0) 推荐(0) 编辑

2013年3月11日

incomplete implementation 警告--查找未实现的方法

摘要: 有时候,我们经常会看到“incomplete implementation”这个警告如何定位到是哪些未实现的方法呢? 右键点击 出现问题行 左侧的黄色三角形图标,点击“Reveal in Issue Navigator” 这样就可以在Issue Navigator中定位到这个错误了,然后再点击展开详细内容,就可以看到我们未实现的那个方法了。找到没有实现的方法后,就好办了。 对于其它错误也可以同样的... 阅读全文

posted @ 2013-03-11 14:16 流れ星ーー 阅读(165) 评论(0) 推荐(0) 编辑

2013年3月6日

The codesign tool requires there only be one.问题解决办法

摘要: 参考 :Quick Fix: Open up KEYCHAIN ACCESS > click on MY CERTIFICATES> in there you will probably see iPhone Developer: . You will probably see it TWICE! Select the one with the earliest Expiration date, ... 阅读全文

posted @ 2013-03-06 10:45 流れ星ーー 阅读(112) 评论(0) 推荐(0) 编辑

2013年3月5日

调用iPhone客户端进行授权发微博的方法

摘要: 以前写微博分享时,都是自己写代码进行授权,后来通过友盟的组件来发完成,代码量少了很多,最近发现有些程序可以直接调用iPhone上已经安装的微博客户端来完成微博的发送,这样更好了,如果已经在微博上输入过用户名了,现在什么都不用输入了,这就更好了。查了一下,原来sina提供了这样的方式,这叫做SSO授权,支持iPhone,安卓。参考网址:http://open.weibo.com/wiki/移动应用S... 阅读全文

posted @ 2013-03-05 13:59 流れ星ーー 阅读(233) 评论(0) 推荐(0) 编辑

2013年2月26日

如何让自己的程序支持iPhone5--RetinaImages

摘要: 我们知道如果想让程序的启动图像能够适应iPhone5(640X1136),那么我们需要把启动的图像命名以“-568h@2x”结尾的图片,那么是不是程序中用到的所有图片都可以用这样的方式来命名,以适合iPhone5呢,事实并不是这样的,这里需要我们自己来做一下调整。我们来写一个UIImage的扩展方法UIImage+iPhone5extension.h#import @interface UIIm... 阅读全文

posted @ 2013-02-26 11:05 流れ星ーー 阅读(168) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页

导航