上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: About Asset CatalogsUse asset catalogs to simplify management of images that are used by your app as part of its user interface.使用asset catalogs可以简化应用... 阅读全文
posted @ 2015-04-15 11:59 cainiaozhang 阅读(782) 评论(0) 推荐(0) 编辑
摘要: Programming with Objective-CEncapsulating DataIn addition to the messaging behavior covered in the previous chapter, an object also encapsulates data ... 阅读全文
posted @ 2015-04-12 17:55 cainiaozhang 阅读(598) 评论(1) 推荐(0) 编辑
摘要: module 的主要目的是把不同的方法和常量分别放进不同的命名空间。module 的命名方式跟类一样首字母大写,多个单词不用下划线。 如:CircleAreamodule 语法 module ModuleName ...... endmodule用范围解析操作符“::”来调用module... 阅读全文
posted @ 2015-03-31 19:50 cainiaozhang 阅读(378) 评论(2) 推荐(0) 编辑
摘要: attr_reader方法------读取实例变量attr_writer方法------改写实例变量attr_accessor方法-----读写实例变量class Person attr_reader :name ---------1 attr_writer :name --------... 阅读全文
posted @ 2015-03-31 18:51 cainiaozhang 阅读(301) 评论(0) 推荐(0) 编辑
摘要: class Computer $manufacturer = "Mango Computer, Inc." # “$" 是全局变量关键字 @@num_of_instances = 0# ”@@“是类变量的关键字,类变量可以作用于所有的实例对象,可以用来计算实例变量的数目 def... 阅读全文
posted @ 2015-03-31 14:12 cainiaozhang 阅读(263) 评论(0) 推荐(0) 编辑
摘要: class Language def initialize(name, creator) @name = name @creator = creator end def description puts "I'm #{@name} and... 阅读全文
posted @ 2015-03-30 17:51 cainiaozhang 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Proc 和 lambda 的目的是把block {....} 变成类似方法一样的对象,使其不需要重复编写同样的block。Proc 和 lambda 的共同点:语法类似Proc.new{|n| n**2}lambda{|n| n**2}都可以用.call方法调用hello_proc = Proc.... 阅读全文
posted @ 2015-03-30 15:47 cainiaozhang 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1. 位(bit)是计算机里最小的数据单位,每一位的状态只能是0或者12.字节(Byte) 1Byte = 8 bit 它是存储空间的基本计量单位,1byte可以存储一个英文字母 或 半个汉字。3. 字 由若干个字节构成,字的位数叫字长,不同档次的机器有不同的字长。 8位机: 1个字 == ... 阅读全文
posted @ 2015-03-30 15:30 cainiaozhang 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Using View Controllers in the Responder Chain响应链中使用视图控制器View controllers are descendants of theUIResponderclass and are therefore capable of handling ... 阅读全文
posted @ 2015-01-07 16:17 cainiaozhang 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Custom Layouts: A Worked ExampleCreating a custom collection view layout is simple with straightforward requirements, but the implementation details o... 阅读全文
posted @ 2014-12-15 17:36 cainiaozhang 阅读(565) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页