内存管理
来源:互联网 发布:网络yy价格 编辑:程序博客网 时间:2024/06/05 03:50
.h 文件
/*
* Copyright (c) 2013年 北京欧乐吧技术有限公司. All rights reserved.
* LandTipItem.h
* GNThumb4IPhone
* Created by crossmo/fulijun on 2013-1-29.
*/
#import <Foundation/Foundation.h>
@interface LandTipItem : NSObject
//common
@property (nonatomic,assign)NSInteger catid; //id
@property (nonatomic,copy) NSString* key; //key
@property (nonatomic,copy) NSString* name; //name
@property (nonatomic,copy) NSString* desc; //decription
@property (nonatomic,assign)NSInteger order; //order
@property (nonatomic,copy) NSString* icon; //icon ,normal
@property (nonatomic,copy) NSString* icon_t; //icon, touch
@property (nonatomic,copy) NSString* icon_s; //icon,selected
@property (nonatomic,assign)NSInteger tiptype; //tip type
@property (nonatomic,assign)NSInteger tipcount; //tip count
//only for show in view
@property (nonatomic,assign)BOOL modify; //can be modifed
@property (nonatomic,assign)BOOL selected; //select state
/**
*reference:sort by order
*parameters:inObject(LandTipItem instance)
*return:NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending
*/
- (NSComparisonResult)compareByOrder:(id)inObject;
@end
.m文件
/*
* Copyright (c) 2013年 北京欧乐吧技术有限公司. All rights reserved.
* LandTipItem.m
* GNThumb4IPhone
* Created by crossmo/fulijun on 2013-1-29.
*/
#import "LandTipItem.h"
@implementation LandTipItem
@synthesize catid;
@synthesize key;
@synthesize name;
@synthesize desc;
@synthesize order;
@synthesize icon;
@synthesize icon_t;
@synthesize icon_s;
@synthesize modify;
@synthesize selected;
@synthesize tiptype;
@synthesize tipcount;
- (void)dealloc
{
[key release];
[name release];
[desc release];
[icon release];
[icon_t release];
[icon_s release];
[super dealloc];
}
/**
*reference:sort by order
*parameters:inObject(LandTipItem instance)
*return:NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending
*/
- (NSComparisonResult)compareByOrder:(id)inObject
{
LandTipItem* temp = (LandTipItem*)inObject;
if (temp.order <=self.order) {
returnNSOrderedDescending;
}else{
returnNSOrderedAscending;
}
}
@end
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 内存管理
- 利用Debian定制适合自己的系统
- jquery checkBox全选及取消全选
- Yii中validator之scenario 场景
- js函数集
- 化简复杂逻辑,编写紧凑的if条件语句(二):依据if子句顺序化简条件
- 内存管理
- 定制debian
- android surfaceflinger研究----显示系统
- lua,安装readline库后,zypper报zypper: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symb
- 关于并行SSH运行命令和文件复制的一些总结
- hashing 与 bloom filter
- NAT的完全分析及其UDP穿透的完全解决方案
- Servlet 中文乱码问题及解决方案剖析
- JS函数集合大全