自定义cell

时间:2015-10-15 23:44:42   收藏:0   阅读:420

//

//  TableViewCell.m

//  TableView

//

//  Created by Bruce on 15/8/25.

//  Copyright (c) 2015年 Bruce. All rights reserved.

//

 

#import "TableViewCell.h"

#import "Canvas.h"

 

@implementation TableViewCell

 

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];

    if (self) {

        CSAnimationView *animationView = [[CSAnimationView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];

        

        animationView.backgroundColor = [UIColor whiteColor];

        

        animationView.duration = 0.5;

        animationView.delay    = 0;

        animationView.type     = CSAnimationTypeShake;

        

        [self.contentView addSubview:animationView];

        

        

        UIView *view =  [[UIView alloc]initWithFrame:CGRectMake(10, 0, 40, 40)];

        view.backgroundColor = [UIColor brownColor];

        [animationView addSubview:view];

        [animationView startCanvasAnimation];

    }

    return self;

}

- (void)awakeFromNib {

    // Initialization code

}

 

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

    [super setSelected:selected animated:animated];

 

    // Configure the view for the selected state

}

 

@end

 

原文:http://www.cnblogs.com/wukun16/p/4883938.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!