iOS --自定义xib
来源:互联网 发布:微信域名要备案吗 编辑:程序博客网 时间:2024/06/13 09:27
cell.h
#import <UIKit/UIKit.h>
@interface OtherCell :UITableViewCell
@property (weak, nonatomic) IBOutletUILabel *lable1; //左边的lable
@property (weak, nonatomic) IBOutletUILabel *lable2; //右边的lable
// 返回xib界面中cell的高度
+ (CGFloat)cellHeight;
// 返回xib界面上写的重用cellID
+ (NSString *)cellID;
// 从xib中加载实例化一个Cell对象
+ (OtherCell *)otherCell;
@end
cell.m
#import "OtherCell.h"
@implementation OtherCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selectedanimated:animated];
// Configure the view for the selected state
}
// 返回xib界面中cell的高度
+ (CGFloat)cellHeight
{
// 查看一下xib中cell的高度
return 44;
}
// 返回xib界面上写的重用cellID
+ (NSString *)cellID{
return@"OtherCell";
}
// 从xib中加载实例化一个Cell对象
+ (OtherCell *)otherCell
{
// mainBundel加载xib,扩展名不用写.xib
NSArray *arrayXibObjects = [[NSBundlemainBundle] loadNibNamed:@"OtherCell"owner:nil options:nil];
return arrayXibObjects[0];
}
@end
- iOS--xib自定义cell
- iOS ---xib自定义cell
- iOS --自定义xib
- IOS XIB自定义View
- iOS在Xib加载自定义Xib视图
- IOS 使用XIB 自定义View
- IOS 使用XIB 自定义View
- iOS使用xib自定义uiview
- IOS 使用XIB 自定义View
- IOS 使用XIB 自定义View
- IOS 使用XIB 自定义View
- iOS使用xib自定义uiview
- iOS使用xib自定义UIView
- ios使用xib自定义view
- ios使用xib自定义view
- IOS 使用XIB 自定义View
- iOS xib关联自定义view
- [iOS 使用xib自定义UIView]
- Java中的String与常量池
- 程序员必知之前端演进史
- Java 中 Iterator<Object>使用
- ObjectStream的使用
- Qt Creator程序发布(动态编译)
- iOS --自定义xib
- struct addrinfo结构体获取ip和port
- 字符数组、冒泡排序
- linux 网络相关
- hadoop-io-序列化机制与jdk序列化机制对比
- HttpClient 文件
- ExecutorService线程池讲解
- C# 的三种序列化方法
- Java笔记