码迷,mamicode.com
首页 >  
搜索关键字:nil    ( 2740个结果
关于nil和 null和NSNull的相关问题
关于nil和?null和NSNull的区别及相关问题 1、nil和null从字面意思来理解比较简单,nil是一个对象,而NULL是一个值,我的理解为nil是将对象设置为空,而null是将基本类型设置为空的,个人感觉有点像属性当中,基本...
分类:其他好文   时间:2014-07-22 08:22:36    阅读次数:220
Swift_ uitableview使用自定义cell
uitableview 使用 xib 的自定义cell? 新建cell:(假如命名 MyCell) 使用: 向 tableview 注册 nib 全局变量 let cellIdentifier = "myCell" myTableView!.registerNib(UINib(nibName: "MyCell", bundle:nil), f...
分类:其他好文   时间:2014-07-21 10:29:38    阅读次数:748
Swift function how to return nil
 这两天在学习Stanford出品的iOS7的课程,这个课程去年也看过,但是看到第3课就不行了,满篇的OC,把人都搞晕了。这段时间因为要写个iOS的App,正好赶上了Swift问世,所以趁着这股劲继续学习iOS的开发,把网上的一些视频关于Swift的都看过和做过了,然后选择看Stanford出品....
分类:其他好文   时间:2014-07-19 21:02:31    阅读次数:209
ruby on rails错误undefined method `title' for nil:NilClass
首先搞清楚这句话,在 Ruby 中,方法分为 public、private 和 protected 三种,只有 public 方法才能作为控制器的动作。 我的出错的代码如下: controlle class ArticlesController < ApplicationController def new end def create params.permit...
分类:其他好文   时间:2014-07-18 18:14:43    阅读次数:295
音频处理
1. 背景音乐1> 添加AVFoundation.framework框架,import该框架头文件2> 加载背景音乐路径 NSString *path = [[NSBundle mainBundle] pathForResource:@”music.mp3” ofType:nil];3> 路径转化....
分类:其他好文   时间:2014-07-16 18:42:21    阅读次数:220
iOS中nil Nil Null的区别
nilNilNULLNSNullnil: A null pointer to an Objective-Cobject. ( #define nil ((id)0) )nil 是一个对象值。Nil: A null pointer to an Objective-Cclass.NULL: A null...
分类:移动开发   时间:2014-07-16 18:10:14    阅读次数:271
AFNetworking实时监测网络连接
// 网络变化消息 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(checkNetwork) name: kReachabilityChangedNotification object: nil...
分类:Web程序   时间:2014-07-14 21:50:23    阅读次数:212
lua中的pairs和ipairs区别
pairs Returns three values: the next function, the table t, and nil, so that the construction for k,v in pairs(t) do body end will iterate over all key–value pairs of table t. See functi...
分类:其他好文   时间:2014-07-14 18:39:58    阅读次数:317
Scheme 链表转置
原list: ( ( 1 2 ) ( 3 4 ) ) 转置: ( ( 3 4 ) ( 1 2 ) ) 深度转置: ( ( 4 3 ) ( 2 1 ) ) ( define tree ( list 1 ( list 2 ( list 3 4 ) 5 ) ( list 6 7 ) ) ) ( define nil '() ) ( define ( my-reverse items...
分类:其他好文   时间:2014-07-14 13:04:42    阅读次数:170
可选类型
let c:String?=nilif c{println("dddd\(c)")}else{println("转化时候")}可选类型,就是与指定类型多一个nil,如果位nil 则为false,如果为指定类型的任意一个值,则表示为真换句话就是nil只能给可选类型,表示没有任何值
分类:其他好文   时间:2014-07-13 12:44:32    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!