【UIKit-110-6】#import <UIKit/UITableView.h>外观
2015-09-28 23:45
459 查看
@interface UITableView :
UIScrollView <NSCoding>
【索引外观】
具体使用见dataSource
@property (nonatomic)
NSInteger sectionIndexMinimumDisplayRowCount;
//
section索引值,row大于多少是显示。
@property (nonatomic,
retain) UIColor *sectionIndexColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// 索引颜色
@property (nonatomic,
retain)
UIColor *sectionIndexBackgroundColor
NS_AVAILABLE_IOS(7_0)
UI_APPEARANCE_SELECTOR;
// 索引背景颜色
@property (nonatomic,
retain)
UIColor *sectionIndexTrackingBackgroundColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// 索引触摸时的颜色。类似高亮。
UITableViewCellSeparatorStyle separatorStyle;
// 分割线类型
@property (nonatomic,
retain)
UIColor *separatorColor
UI_APPEARANCE_SELECTOR;
// 分割线颜色
@property (nonatomic,
copy) UIVisualEffect *separatorEffect
NS_AVAILABLE_IOS(8_0)
UI_APPEARANCE_SELECTOR;
// effect to apply to table separators
retain)
UIView *tableHeaderView;
// 整个表的表头
@property (nonatomic,
retain)
UIView *tableFooterView;
// 整个表的表尾
// cell样式
- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath
*)indexPath NS_AVAILABLE_IOS(6_0);
// cell样式(indexpath)
- (id)dequeueReusableHeaderFooterViewWithIdentifier:(NSString *)identifier
NS_AVAILABLE_IOS(6_0);
// 表头表尾
UIScrollView <NSCoding>
【索引外观】
具体使用见dataSource
@property (nonatomic)
NSInteger sectionIndexMinimumDisplayRowCount;
//
section索引值,row大于多少是显示。
@property (nonatomic,
retain) UIColor *sectionIndexColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// 索引颜色
@property (nonatomic,
retain)
UIColor *sectionIndexBackgroundColor
NS_AVAILABLE_IOS(7_0)
UI_APPEARANCE_SELECTOR;
// 索引背景颜色
@property (nonatomic,
retain)
UIColor *sectionIndexTrackingBackgroundColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// 索引触摸时的颜色。类似高亮。
theTableView.sectionIndexMinimumDisplayRowCount = 1; theTableView.sectionIndexColor = [UIColor redColor]; theTableView.sectionIndexBackgroundColor = [UIColor yellowColor]; theTableView.sectionIndexTrackingBackgroundColor = [UIColor blueColor];
【分割线】
@property (nonatomic)UITableViewCellSeparatorStyle separatorStyle;
// 分割线类型
@property (nonatomic,
retain)
UIColor *separatorColor
UI_APPEARANCE_SELECTOR;
// 分割线颜色
@property (nonatomic,
copy) UIVisualEffect *separatorEffect
NS_AVAILABLE_IOS(8_0)
UI_APPEARANCE_SELECTOR;
// effect to apply to table separators
theTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; /* typedef NS_ENUM(NSInteger, UITableViewCellSeparatorStyle) { UITableViewCellSeparatorStyleNone, UITableViewCellSeparatorStyleSingleLine, UITableViewCellSeparatorStyleSingleLineEtched // 无视他 }; */ theTableView.separatorColor = [UIColor redColor];<span style="white-space:pre"> </span>//分割线颜色 theTableView.backgroundColor=[UIColor clearColor];<span style="white-space:pre"> </span>// 毛玻璃效果(详情研究 UIVIbrancyEffect) // 设置毛玻璃 UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect]; theTableView.separatorEffect = vibrancyEffect;
【表头,表尾】
@property (nonatomic,retain)
UIView *tableHeaderView;
// 整个表的表头
@property (nonatomic,
retain)
UIView *tableFooterView;
// 整个表的表尾
UIView *redView = [[UIView alloc]initWithFrame:CGRectMake(110, 10, 11, 111)]; redView.backgroundColor = [UIColor redColor]; theTableView.tableHeaderView = redView;
【注册cell样式】
- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier;// cell样式
- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath
*)indexPath NS_AVAILABLE_IOS(6_0);
// cell样式(indexpath)
- (id)dequeueReusableHeaderFooterViewWithIdentifier:(NSString *)identifier
NS_AVAILABLE_IOS(6_0);
// 表头表尾
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell"];其他类似
相关文章推荐
- AndroidUI 视图动画-透明动画效果 (AlphaAnimation)
- AndroidUI 视图动画-透明动画效果 (AlphaAnimation)
- AbstractQueuedSynchronizer 源码理解
- 使用代码自定义UIView注意一二三(转)
- [Android] java.lang.IllegalArgumentException: Illegal character in query at index 57
- UVa133——The Dole Queue
- LeetCode——N-Queens
- LeetCode——N-Queens II
- 【UIKit-110-5】#import <UIKit/UITableView.h>选中行
- hdu5493Queue 树状数组+二分
- hdu 5493 Queue 线段树
- NSIS 的 Modern UI 教程
- UITabBarController、UITabBar
- HDU 5493 Queue
- iOS:提示框(警告框)控件UIAlertView的详解
- iOS开发入门_应用程序的执行顺序_UI_01
- 【java】Request和Response
- EasyUI实战篇之datagrid:如何重新设置datagrid所配置的属性(options)并重新查询列表(relaod)
- UI课程17 图片异步下载、KVO
- NSFetchedResultsController、CoreData、UITableView