![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
熊宝xr
iOS开发,单片机,街舞,轮滑,这些都是我喜欢的
展开
-
iOS中的round/ceil/floorf函数略解
extern float ceilf(float); extern double ceil(double); extern long double ceill(long double); extern float floorf(float); extern double floor(double); extern long double floorl(longdouble);转载 2016-05-24 12:00:06 · 365 阅读 · 0 评论 -
iOS多线程的初步研究(十)-- dispatch同步
原文地址 http://www.cnblogs.com/sunfrog/p/3243230.html GCD提供两种方式支持dispatch队列同步,即dispatch组和信号量。 一、dispatch组(dispatch group) 1. 创建dispatch组 dispatch_group_t group = dispatch_group_create();转载 2016-05-26 14:28:44 · 339 阅读 · 0 评论 -
如何让iOS启动屏停留更久
就说一个最简单的方法,用延时 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [NSThread sleepForTimeInterval:2.0]; return YES; }原创 2016-05-09 19:34:48 · 861 阅读 · 0 评论 -
BearSkill之UIView挖空处理
扫描二维码的界面或者特定的View需要做挖空处理,在StackOverFlow上找了一番,发现了一些有用的方法,并且整理了一下。挖空效果图核心代码 Demo地址: https://github.com/BearRan/TestCutOut - (void)drawRect:(CGRect)rect { [super drawRect:rect]; // 设置View的fill颜色原创 2016-06-08 17:35:03 · 2241 阅读 · 0 评论 -
NSJSONSerialization-JSON数据与NSDictionary和NSArray之间的转化
原文网址:http://blog.sina.com.cn/s/blog_7b9d64af0101ce92.html 在iOS 5 中,苹果引入了一个解析JSON串的NSJSONSerialization类。 通过该类,我们可以完成JSON数据与NSDictionary和NSArray之间的转化。 以前,我记得我用的是第三方的插件。但是,苹果出了这套解析后,效率也大大了超过了转载 2016-07-31 11:46:46 · 320 阅读 · 0 评论 -
解决UINavigationBar 的leftBarButtonItem点击范围过大问题
原文地址:http://blog.csdn.net/shaobo8910/article/details/45057051 最近可爱的测试MM帮忙发下一个问题,导航栏leftBarButtonItem 自定义一个Button的时候,按钮的实际点击范围会过大。虽然我输出按钮的frame 是正常大小。于是上网查了下找到一个解决办法,记录下: **其实就是将button 添加到一个一样大小的转载 2016-08-09 11:05:10 · 692 阅读 · 0 评论 -
iPhone How-to:图片的灰度处理
原文地址:http://bj007.blog.51cto.com/1701577/541525 表示点击无效或者用户离线的情况下通常会使用一些灰度图片。在iPhone中如何将普通图片转换成相应的灰度图像呢?下面这段代码给出了答案。 UIImage *grayImage(UIImage *source) { int width = source.size.width;转载 2016-08-12 11:21:26 · 714 阅读 · 0 评论 -
直接用URLWithString来拼接NSURL有时候得到的NSURL是为nil的
今天在使用URLWithString拼接NSURL的时候出现了nil: [objc] view plain copy print? NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@?%@",host_url,baseurl,postURL]];转载 2017-01-09 20:57:07 · 766 阅读 · 0 评论 -
iOS滚珠菜单动效
iOS滚珠菜单动效,核心代码使用了UIDynamic物理引擎原创 2016-07-04 07:55:21 · 4708 阅读 · 1 评论