为了兼容Swift 中的 ? 和 ! oc 在6.3引入了两个新的类型注释:__nullable和__nonnull , 在字面上很好理解 可能为空, 不为空, 在上面代码中间则表示 默认的所有的属性都不能为空,这样我们在敲码的过程中只需要手写__nullable的类型就可以了 上边的代码 就涉及到 ...
分类:
其他好文 时间:
2016-05-23 14:42:03
阅读次数:
263
//ios常用坐标转换来处理一些下拉框队形的按钮的位置,我以最下面两个来进行一下个人的理解,不足之处多多见谅 - (CGPoint)convertPoint:(CGPoint)point toView:(nullable UIView *)view; - (CGPoint)convertPoint: ...
分类:
移动开发 时间:
2016-05-13 10:37:21
阅读次数:
145
iOS9新特性之关键字
iOS9新出的关键字:用来修饰属性,或者方法的参数,方法的返回值
好处:迎合swift
提高我们开发人员开发规范,减少程序员之间交流
注意: iOS9新出关键字nonnull,nullable,null_resettable,_Null_unspecified只能修饰对象,不能修饰基本数据类型
/**
1. 首字母不带下滑线的修饰类名(eg. nullable)...
分类:
移动开发 时间:
2016-05-13 00:08:03
阅读次数:
235
基础
所有的startActivity()最终都会执行到下Activity#startActivityForResult
public void startActivityForResult(Intent intent, int requestCode, @Nullable Bundle options) {
if (mParent == null) {...
分类:
其他好文 时间:
2016-05-12 22:15:30
阅读次数:
151
#import "ViewController.h" @interface ViewController () @property(nonatomic,nullable)NSString*name;//可以为空 @property(nonatomic,nonnull)NSString*passwor ...
分类:
移动开发 时间:
2016-05-11 11:11:17
阅读次数:
230
@NotEmpty:不能为“” 和不能为空集合。 @Column(nullable = false, updatable = false, unique = true) 表明这一列不能为空, 不能修改, 唯一的 @Lob 大存储字段 @NotNull(groups = ValidationServi ...
分类:
其他好文 时间:
2016-05-06 14:41:46
阅读次数:
194
如何保证传入值的值不为空idc_name=db.Column(db.String(30),nullable=False)如何保证传入的值是唯一的name=db.Column(db.String(10),index=True,nullable=False,unique=True)
分类:
编程语言 时间:
2016-04-30 01:10:02
阅读次数:
274
最近在用Xcode 6.3写代码,一些涉及到对象的代码会报如下编译器警告: 1 Pointer is missing a nullability type specifier (__nonnull or __nullable) 1 Pointer is missing a nullability t ...
分类:
其他好文 时间:
2016-04-29 00:04:35
阅读次数:
188
关于原生和hybid之争,这里不做探讨.主要讲讲JS和OC交互
开讲前附上一个牛逼的第三方
JavascriptBridge
OC执行JS代码
1.stringByEvaluatingJavaScriptFromString
这个方法是UIWebView里面的方法,也是最为简单的和JS交互的方式
- (nullable NSString *)stringBy...
分类:
移动开发 时间:
2016-04-28 12:23:58
阅读次数:
199
package com.cardvalue.sys.fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Linea...
分类:
其他好文 时间:
2016-04-22 19:14:27
阅读次数:
237