归档(1)
2015-10-15 23:10
387 查看
//
// 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
// 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
相关文章推荐
- 移动端touch模块
- ios textfield限制中文输入长度
- Oracle创建序列
- Spring中数据库技术--获得DataSource
- python正则表达式操作
- Oracle创建序列
- 连载《一个程序猿的生命周期》- 39、年底,历时一个月找工作,无奈中前行
- Spring中数据库技术--获得DataSource
- 特性(摘要)
- Maven打包XML等资源文件
- java常用集合类
- 函数指针作为某个函数的参数及定义函数指针
- dev 官网
- Android项目下各文件夹及文件详解
- Ubuntu14.04安装wineqq国际版
- Android四大组件之一:BroadcastReceiver应用详解(带实例)
- iOS:核心动画具体的类和协议的介绍
- 自定义cell
- 连载《一个程序猿的生命周期》- 39、年底,历时一个月找工作,无奈中前行
- 迅雷校招 面试经历