学习IOS开发UI篇--UI知识点总结(四) UITabelView/UITableViewCell
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了学习IOS开发UI篇--UI知识点总结(四) UITabelView/UITableViewCell,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2951字,纯文字阅读大概需要5分钟。
内容图文
UITabelView:常用属性
@property (nonatomic) CGFloat rowHeight; // will return the default value if unset
@property (nonatomic) CGFloat sectionHeaderHeight; // will return the default value if unset
@property (nonatomic) CGFloat sectionFooterHeight; // will return the default value if unset
@property(nonatomic, readwrite, retain) UIView *backgroundView
UITableView:常用方法
- (void)reloadData;
- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier;
- (id)dequeueReusableHeaderFooterViewWithIdentifier:(NSString *)identifier
UITableView:数据源方法
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section; // fixed font style. use custom view (UILabel) if you want something different
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section;
UITableView:代理方法
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section; // custom view for header. will be adjusted to default or specified header height
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section; // custom view for footer. will be adjusted to default or specified footer height
UITableViewCell:属性
@property (nonatomic, readonly, retain) UIImageView *imageView NS_AVAILABLE_IOS(3_0); // default is nil. (默认style中有这三个属性)
@property ( nonatomic , readonly , retain ) UILabel *textLabel NS_AVAILABLE_IOS ( 3 _0); // default is nil.
@property (nonatomic, readonly, retain) UILabel *detailTextLabel NS_AVAILABLE_IOS(3_0); // default is nil. label will be created if necessary (and the current style supports a detail label).
UITableViewCell:方法
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifie
UITableViewCellStyle的状态
UITableViewCellStyleDefault,// Simple cell with text label and optional image view (behavior of UITableViewCell in iPhoneOS 2.x)
UITableViewCellStyleValue1,// Left aligned label on left and right aligned label on right with blue text (Used in Settings)
UITableViewCellStyleValue2,// Right aligned label on left with blue text and left aligned label on right (Used in Phone/Contacts)
UITableViewCellStyleSubtitle// Left aligned label on top and left aligned label on bottom with gray text (Used in iPod).
原文:http://www.cnblogs.com/zhaoyan/p/3763388.html
内容总结
以上是互联网集市为您收集整理的学习IOS开发UI篇--UI知识点总结(四) UITabelView/UITableViewCell全部内容,希望文章能够帮你解决学习IOS开发UI篇--UI知识点总结(四) UITabelView/UITableViewCell所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。