码迷,mamicode.com
首页 > 移动开发 > 详细

IOS apprentice

时间:2015-04-16 06:46:42      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

1. generics: meaning that they are independt of the type of thing you want to store inside these collections

2. optional

var checklistToEdit: Checklist?

3. Binding/ unwrapping: you cannot use optional variable directly, you must always test whether it has a value or not.

if let checklist = checklistToEdit {
 // “checklist” now contains the real object
} else {
 // the optional was nil
}

 

技术分享
sfafads
View Code

 

IOS apprentice

标签:

原文地址:http://www.cnblogs.com/glee/p/4430893.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!