前面写了一篇文章是关于comparator的,那么comparable就必须拿出来做了分析对比。
关于这俩个接口的文章也比较多,本文着重从完整的代码示例去展现说明。
OK
首先,还是看下Comparator这里接口的代码:
public interface Comparable {
/**
* Compares this object with the specified...
分类:
编程语言 时间:
2014-08-18 18:40:52
阅读次数:
225
#import
@interface UIColor (RandomColor)
+(UIColor *) randomColor;
@end
#import "UIColor+RandomColor.h"
@implementation UIColor (RandomColor)
+(UIColor *) randomColor
{
CGFloat hue = ( arc4r...
分类:
移动开发 时间:
2014-08-18 18:34:33
阅读次数:
230
#import "AViewController.h"#define max 8888888888@interface AViewController ()@property (nonatomic,strong)UITableView *myTabView;@property (nonatomic,...
分类:
其他好文 时间:
2014-08-18 18:21:02
阅读次数:
282
ViewController.h
#import
@interface ViewController : UIViewController
@property (strong, nonatomic)UICollectionView *collectionView;
@end
ViewController.m
#import "ViewController.h"
@interface...
分类:
其他好文 时间:
2014-08-18 16:32:02
阅读次数:
170
OC点语法和变量作用域一、点语法(一)认识点语法声明一个Person类: 1 #import 2 3 @interface Person : NSObject 4 { 5 int _age;//默认为@protected 6 } 7 8 - (void)setAge:(int)age;...
分类:
其他好文 时间:
2014-08-18 14:27:02
阅读次数:
166
UI概述UI(User
Interface):用户界面,用户能够看到的各种个样页面元素。iOSApp
=各种各样的UI控件+业务逻辑+算法。UIWindowwindow是窗口,每个App
都需要借助window将内容展现给用户看。在IOS中,使用UIWindow类来表示窗口。通常一个应用程序只创建一个UIWindow
对象。因为..
分类:
其他好文 时间:
2014-08-18 09:19:24
阅读次数:
197
The registration of callback functions is very common in JavaScript web programming, for example to attach user interface event handlers (such as oncl...
分类:
编程语言 时间:
2014-08-18 02:48:43
阅读次数:
465
实验01:三层交换和动态路由的练习实验目标:通过配置单层交换和动态路由实现内网和外网通信实验环境:打开ciscopackettracer软件,实验拓扑图如下:实验步骤:一、打开ciscopackettracer软件,添加一台路由器、一台三层交换机、一台二层交换机和三台主机,并用交叉线和直连线..
分类:
Web程序 时间:
2014-08-18 01:44:43
阅读次数:
428
实验01:HSRP(热备份路由协议)实验目标:配置hsrp使得当一台主机出现故障时,数据仍能传送实验环境:打开ciscopackettracer软件,实验拓扑如下:实验步骤:一、添加三台路由器、一台交换机和三台主机,并用直通线和交叉线按照实验拓扑连接二、配置路由器router01、配置端口ip..
分类:
其他好文 时间:
2014-08-18 01:44:23
阅读次数:
454
实验单臂路由实验目标用单臂路由,实现不同领域计算机之间的通信实验环境实验步骤一、配置ip地址二、创建vlan2、vlan3,将f0/1加入到vlan2,将f0/2加入到vlan3中三、将f0/4设置为trunk模式四、将f0/3设置为trunk模式五、开启路由器f0/0接口,并封装f0/0.1六、封装f0/0.2、配置I..
分类:
其他好文 时间:
2014-08-18 01:44:13
阅读次数:
268