Swift: Memory Management -> Weak, Unowned, Strong

Weak 和Objective-C的很像 (auto niled) Weak

2014-06-29 23:22:25

阅读数 948

评论数 0

Swift:Optional KeyNote

Optionals Use optionals to safely working with possibly missing values

2014-06-29 20:46:51

阅读数 367

评论数 0

Swift 调用 Objective-C代码 1)

1. Initialization For example, where in Objective-C you would do this: SWIFT let myTableView: UITableView = UITableView(frame: CGRec...

2014-06-25 11:04:55

阅读数 877

评论数 0

swift 易忽略的笔记 12): Miscellaneous

1. Curried Functions and Methods Curried functions and methods have the following form: func function name(parameters)(parameters) -> retur...

2014-06-24 20:35:10

阅读数 411

评论数 0

swift 易忽略的笔记 11):Operator Functions

1.  @infix struct Vector2D { var x = 0.0, y = 0.0 } @infix func + (left: Vector2D, right: Vector2D) -> Vector2D { return Vector2D(x: left...

2014-06-24 15:38:30

阅读数 495

评论数 0

swift 易忽略的笔记 10):Generic

1. Generic Functions func swapTwoValues(inout a: T, inout b: T) { let temporaryA = a a = b b = temporaryA }

2014-06-24 14:27:47

阅读数 481

评论数 0

Swift 易忽略的笔记 9):Protocol

Protocols “A protocol defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality.” ...

2014-06-24 11:35:32

阅读数 752

评论数 0

Swift 易忽略的笔记 8):Extensions

1. Extensions Extensions add new functionality to an existing class, structure, or enumeration type. This includes the ability to extend types f...

2014-06-24 10:31:54

阅读数 474

评论数 0

Swift 易忽略的笔记 7):Type Casting & Nested Type

1. Type Casting Checking Type

2014-06-24 09:57:36

阅读数 504

评论数 0

Swift 易忽略的笔记 6):Methods & Subscripts

1。 Methods 分为instance method 和 type methods

2014-06-23 18:34:45

阅读数 503

评论数 0

Swift 易忽略的笔记 5):Enumeration & Classes and Structs & Properties总结

1. Enumeration let somePlanet = Planet.Earth switch somePlanet { case .Earth: println("Mostly harmless") default: println("No...

2014-06-23 13:20:01

阅读数 857

评论数 0

Mac OS X进程隐藏后 关机卡住问题

实现进程隐藏后,关机的时候,有一定概率会出现卡住死机,关不了现象

2014-06-23 08:45:11

阅读数 1068

评论数 0

Swift 易忽略的笔记 4):Function & Closure

1. func func join(string s1: String, toString s2: String, withJoiner joiner: String) -> String { return s1 + joiner + s2 }

2014-06-23 07:50:47

阅读数 516

评论数 0

Swift 易忽略的笔记 3): Array & Dictionary

1. Array for item in shoppingList { println(item) } // Six eggs for (index, value) in enumerate(shoppingList) { println("Item \(index ...

2014-06-22 11:29:26

阅读数 374

评论数 0

Swift 易忽略的笔记 2):String

1. String “Swift’s String type is a value type. If you create a new String value, that String value is copied when it is passed to a function or met...

2014-06-22 10:57:05

阅读数 403

评论数 0

Swift 易忽略的笔记 1)

1. 一条语句结尾没有分号;

2014-06-21 10:44:37

阅读数 410

评论数 0

Adding Login Items (OS X)

Adding Login Items  There are two ways to add a login item: using the Service Management framework, and using a shared file list Login ...

2014-06-13 09:21:09

阅读数 808

评论数 0

Logout Responsibilities (OS X)

Logout Responsibilities The procedures for logging out, restarting the system, or shutting down the system are similar. A typicallogout/restart/shut...

2014-06-13 08:55:49

阅读数 456

评论数 0

Protocols for Communicating with Daemons (OS X)

Protocols for Communicating with Daemons There are four major communication mechanisms commonly used between daemons and their clients: XPC,traditio...

2014-06-13 08:40:42

阅读数 528

评论数 0

Types of Background Processes (OS X)

There are four types of background processes in OS X. The differences are summarized in Table 1-1 (page 9)and described in detail in the following ...

2014-06-12 17:28:00

阅读数 352

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭