NSObject的hash方法 说明本示例仅仅演示一个对象什么时候执行hash方法。 细节1. 必要的Model类,重载了hash方法用以反映Hash方法是否被调用了2. 测试//// ViewController.m// Hash//// Created by YouX ...
NSObject的hash方法
说明
本示例仅仅演示一个对象什么时候执行hash方法。
细节
1. 必要的Model类,重载了hash方法用以反映Hash方法是否被调用了
2. 测试
//// ViewController.m// Hash//// Created by YouXianMing on 16/4/15.// Copyright © 2016年 YouXianMing. All rights reserved.//#import "ViewController.h"#import "Model.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; Model *model = [Model new]; [model hash]; model = nil;}@end
原标题:NSObject的hash方法
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。