【UIKit-110-6】#import <UIKit/UITableView.h>外观


@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; // 索引触摸时的颜色。类似高亮。

    
    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"];
其他类似




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值