1.关键字:可以用于属性 方法和返回值参数中 关键字作用:提示作用 告诉开发者属性信息 关键字的目的:迎合swift 强语言,swift必须要指定一个对象是否为空 关键字好处:提高代码规划,减少沟通成本 仅仅是提供警告并不会报编译错误 nullabel作用 :提示可能为空 语法 1 @propert ...
分类:
其他好文 时间:
2016-09-09 10:00:49
阅读次数:
327
Incompatible pointer types assiging to "UIViewController" *_Nullable' from 'AppDelegate*' 本人遇到此问题的情况:在AppDelegate.h中判断版本号时,进行跳转引导页或主控制器。 self.window.r ...
分类:
移动开发 时间:
2016-09-06 22:50:30
阅读次数:
863
Apple官方文档对于加载image提供了两个方法 + (nullable UIImage *)imageNamed:(NSString *)name; + (nullable UIImage *)imageWithContentsOfFile:(NSString *)path; 那么这两个方法对于 ...
分类:
移动开发 时间:
2016-08-24 13:03:39
阅读次数:
302
iOS9新特性关键字:可以用于属性、方法返回值和参数中 关键字的作用:提示作用,告诉开发者属性信息 关键字的目的:迎合swift,swift是个强语言,swift必须要指定一个对象是否为空 关键字的好处:提高代码规划,减少沟通成本 关键字使用错误仅仅报一个警告,并不会编译错误 nullable:1. ...
分类:
移动开发 时间:
2016-08-21 15:18:59
阅读次数:
195
public class MyService extends Service { @Nullable @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate() { ...
分类:
其他好文 时间:
2016-08-19 20:47:20
阅读次数:
164
总结: ## NSDateFormatter的作用 - NSString \* -> NSDate * ```obj - (nullable NSDate *)dateFromString:(NSString *)string; ``` - NSDate \* -> NSString * ```ob ...
分类:
移动开发 时间:
2016-08-14 23:49:58
阅读次数:
526
1.用来修饰属性,或者方法的参数,方法的返回值 /** nullable:表示可以传空 */ //@property (nonatomic, strong, nullable) NSString *name; //@property (nonatomic, strong) NSString * __ ...
分类:
移动开发 时间:
2016-08-14 23:44:00
阅读次数:
219
You are trying to add a non-nullable field 'SKU' to product without a default; we can't do that (the database needs something to populate existing row ...
分类:
其他好文 时间:
2016-08-05 00:56:15
阅读次数:
554
常量 val a: Int = 5 变量 var a: Int = 5 Any:匹配任何类型 ?:nullable,比如 a?.toString,如果 a 为 null 不会出错。 函数基本结构 String 字符串中可以加参数 print("First argument: ${array[0]}" ...
分类:
其他好文 时间:
2016-08-02 18:55:17
阅读次数:
170
iOS9 新出的关键字:用来修饰属性,或者方法的参数,返回值 好处:1.迎合swift 2.提高我们开发人员开发规范,减少程序员之间的交流 注意:iOS9新出的的关键字nonnull,nullable,null_unspecified,null_resettable只能修饰对象,不能修饰基本数据类型 ...
分类:
移动开发 时间:
2016-07-28 13:59:43
阅读次数:
176