1、在第二个视图控制器的.h文件中定义声明Block属性: // 定义block @property (nonatomic, copy) void (^NextViewControllerBlock)(NSString *tfText); @interface NextViewController ...
分类:
移动开发 时间:
2018-03-30 19:58:46
阅读次数:
178
直接上代码: #import "ViewController.h" #import <Contacts/Contacts.h> #import <ContactsUI/ContactsUI.h> @interface ViewController ()<CNContactPickerDelegate ...
分类:
其他好文 时间:
2018-03-30 19:58:31
阅读次数:
122
added in API level 18 BluetoothAdapter.LeScanCallback added in API level 18 BluetoothAdapter.LeScanCallback public static interface BluetoothAdapter.L ...
分类:
其他好文 时间:
2018-03-30 18:29:24
阅读次数:
689
本文介绍了ABI的概率和具体内容,并举例从ABI(application binary interface)应用程序二进制接口角度讲解程序的可移植性。
分类:
其他好文 时间:
2018-03-30 13:17:42
阅读次数:
108
如果做开发的工作,工厂设计模式大概都已经深入人心了,比较常见的例子就是在代码中实现数据库操作类,考虑到后期可能会有数据库类型变换或者迁移,一般都会对一个数据库的操作类抽象出来一个接口,然后用工厂去获取实际数据库操作类实例。 下面举一个最简单的工厂模式例子: interface IAnimal { v ...
分类:
编程语言 时间:
2018-03-30 12:15:46
阅读次数:
154
nsqadmin 结构体定义 go type Options struct { LogLevel string LogPrefix string Verbose bool // for backwards compatibility Logger Logger logLevel lg.LogLeve ...
分类:
其他好文 时间:
2018-03-29 21:21:27
阅读次数:
385
要实现拦截器,首先我们需要定义几个类和接口 package com.xiawei.reflect.interceptor; public interface JavaBenDao { public void look();} package com.xiawei.reflect.intercepto ...
分类:
其他好文 时间:
2018-03-29 21:15:29
阅读次数:
433
IEnumerator和IEnumerable详解 IEnumerator和IEnumerable 从名字常来看,IEnumerator是枚举器的意思,IEnumerable是可枚举的意思。了解了两个接口代表的含义后,接着看源码:IEnumerator: public interface IEnum ...
分类:
编程语言 时间:
2018-03-29 20:10:28
阅读次数:
223
A: 创造性模式 1. 工厂方法模式(FactoryMethod) 1.1 类图 1.2 代码 public interface Pet { public String petSound(); } public class Cat implements Pet { @Override public ...
分类:
编程语言 时间:
2018-03-29 19:08:47
阅读次数:
155
前言 在使用虚拟机搭建集群时,需要实现虚拟机与虚拟机之间互相ping通,并且主机与虚拟机也可以互相ping通。 一、环境准备: 1、主机为win7 2、virtualbox下创建两台ubuntu虚拟机 二、virtualbox配置 1、选中虚拟机,打开设置-->网络 2、连接方式选择“桥接网卡” 3 ...
分类:
其他好文 时间:
2018-03-29 12:40:36
阅读次数:
117