上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 109 下一页

2015年8月4日

(一〇六)iPad开发之UIPopoverController的使用

摘要: 很多App里都有一种点击显示的悬浮气泡菜单,例如下图: 在iPad上可以使用UIPopoverController实现这个功能,popoverController继承自NSObject而不是UIView,这是因为它本身并不能显示,popoverController的显示内容取决于成员属性con... 阅读全文

posted @ 2015-08-04 15:52 张大大123 阅读(200) 评论(0) 推荐(0) 编辑

1070. Mooncake (25)

摘要: 题目如下: Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in ... 阅读全文

posted @ 2015-08-04 12:19 张大大123 阅读(137) 评论(0) 推荐(0) 编辑

1069. The Black Hole of Numbers (20)

摘要: 题目如下: For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then i... 阅读全文

posted @ 2015-08-04 12:14 张大大123 阅读(184) 评论(0) 推荐(0) 编辑

2015年8月3日

(一〇五)二维码的生成和扫描

摘要: 【生成二维码】 iOS7以后苹果有CoreImage框架用于生成二维码,二维码通过滤镜生成,二维码滤镜可以将字符串转化为二维码。 注意字符串必须转化为NSData传入,通过KVC告诉滤镜。 滤镜输出为CIImage,注意要转化为UIImage使用。 代码如下: // 1.实例化二维码... 阅读全文

posted @ 2015-08-03 22:05 张大大123 阅读(182) 评论(0) 推荐(0) 编辑

(一〇四)使用Xcode6创建framework动态静态库

摘要: 在Xcode6以前,创建framework可以使用iOS-Universal-Framework模板来创建framework,现在苹果已经提供了模板,如下图选择: 使用此模版创建的默认是动态库,方法和上节提到的.a一样,也可以使用lipo来合并真机和模拟器的库。 还有自定义动态库的应用是不被允... 阅读全文

posted @ 2015-08-03 20:06 张大大123 阅读(124) 评论(0) 推荐(0) 编辑

1068. Find More Coins (30)

摘要: 题目如下: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall... 阅读全文

posted @ 2015-08-03 14:10 张大大123 阅读(136) 评论(0) 推荐(0) 编辑

2015年8月2日

(一〇三)静态库(.a)的调试

摘要: 上节介绍的方法,只能创建静态库而不能调试,因为直接创建静态库工程并非可执行文件。 本文介绍的方法创建的静态库断点能够在调试时起作用。 为了能够调试静态库,应该在一个可执行工程(例如Single View Application),然后再其内部再加入一个静态库,加入的方法如下图所示: 点击工程配... 阅读全文

posted @ 2015-08-02 22:33 张大大123 阅读(306) 评论(0) 推荐(0) 编辑

(一〇二)静态库(.a)的打包

摘要: 库是代码的集合,根据代码公开程度,分为开源库和闭源库。 其中闭源库主要包括静态库和动态库,是经过编译的二进制文件,看不到具体实现。 静态库的拓展名是.a或者.framework,动态库则是.dylib和.framework。 静态库在链接时会将库完整的复制到可执行文件中,被多次使用就有冗余拷贝。... 阅读全文

posted @ 2015-08-02 22:07 张大大123 阅读(191) 评论(0) 推荐(0) 编辑

1067. Sort with Swap(0,*) (25)

摘要: 题目如下: Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY op... 阅读全文

posted @ 2015-08-02 20:09 张大大123 阅读(112) 评论(0) 推荐(0) 编辑

2015年8月1日

(一〇一)集成静态库RHAddressBook实现OC访问通讯录

摘要: 使用官方的AddressBook框架仅能使用C语言访问通讯录,十分不便,这里介绍集成第三方框架RHAddressBook的方法,该框架可以通过OC访问和操作通讯录。 该框架是一个静态库,集成比较复杂。 首先下载该框架:RHAddressBook,下面有关于集成的一些介绍,下面简单的介绍一下集成的... 阅读全文

posted @ 2015-08-01 19:29 张大大123 阅读(127) 评论(0) 推荐(0) 编辑

上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 109 下一页

导航