1.工厂方法模式的定义工厂方法模式使用的频率非常高, 在我们日常的开发中总能见到它的身影。 其定义为:Define an interface for creating an object,but let subclasses decide which class toinstantiate.Fact...
分类:
编程语言 时间:
2015-09-04 12:19:43
阅读次数:
272
//Home目录 let homeDirectory = NSHomeDirectory() //Documents目录 苹果建议将程序中建立的或在程序中浏览到的文件数据保存在该目录下,iTunes备份和恢复的时候会包含此目录 let documentPaths = NSSearchPathFor....
分类:
移动开发 时间:
2015-09-03 21:40:28
阅读次数:
181
http://blog.csdn.net/cnjet/article/details/5909541Calling Lua scripts from c++’s example was written in postHow to embed Lua 5.1 in C++. Now, let us l...
分类:
数据库 时间:
2015-09-03 10:23:41
阅读次数:
217
1061. Dating (20)时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSherlock Holmes received a note with some strange strings: "Let's date! 3485...
分类:
其他好文 时间:
2015-09-02 20:47:15
阅读次数:
218
extension UIView{ //任意UIView添加badge func showBadgeValue(#strBadgeValue: String) -> Void{ let tabBar = UITabBar(frame: CGRectMake...
分类:
编程语言 时间:
2015-09-02 02:03:13
阅读次数:
146
Description"Let it Bead" company is located upstairs at 700 Cannery Row in Monterey, CA. As you can deduce from the company name, their business is be...
分类:
其他好文 时间:
2015-09-01 19:51:56
阅读次数:
212
Knowledge of algorithms has very little to do with programming skill. As some random dude* on the internet once said: "When in doubt, use brute force." Let's unpack what this means.A good programme...
分类:
编程语言 时间:
2015-08-31 23:40:42
阅读次数:
210
Swift UILabel的宽度一般都是固定的,但是文字有时候长有时候短,如何做到文字在超过Label宽度之后适当缩小使得现实完全
其实,很多简单 我们调用
adjustsFontSizeToFitWidth
即可实现
let label1=UILabel(frame: CGRectMake(30, 120, 300, 36))
l...
分类:
编程语言 时间:
2015-08-31 21:47:32
阅读次数:
270
Swift UIView本事自带了一些简单的动画。
如果不是很复杂的需求,可以考虑使用此处的方法。
下面我们简单尝试一下
首先创建三个View 分别设置三中背景色
let view1=UIView(frame: CGRectMake(10, 50, 200, 200))
let view2=UIView(frame: CGRectMake(60, 100, ...
分类:
编程语言 时间:
2015-08-31 13:41:59
阅读次数:
164
原创文章,欢迎转载。转载请注明:关东升的博客 ??? 计算机语言学习中都有常量和变量,他们几乎是我编写代码的灵魂了,离开他们我真的是“活不了” 常量是标识符的前面加上关键字let。常量其值在使用过程中不会...
分类:
编程语言 时间:
2015-08-31 12:01:25
阅读次数:
167