星星,停靠模式
来源:互联网 发布:贵州发展大数据带动 编辑:程序博客网 时间:2024/05/24 04:51
- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { _backImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 65, 23)]; _backImgView.image = [UIImage imageNamed:@"StarsBackground.png"]; [self addSubview:_backImgView]; _frontImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 65, 23)]; _frontImgView.image = [UIImage imageNamed:@"StarsForeground.png"]; [self addSubview:_frontImgView]; // 图片居左停靠 _backImgView.contentMode = UIViewContentModeLeft; _frontImgView.contentMode = UIViewContentModeLeft; // 切除超出部分(是切图片) _frontImgView.clipsToBounds = YES; } return self;} - // 根据评分 切除多余的星星--------------- - (void)setRating:(CGFloat)rating{ _rating = rating; _frontImgView.frame = CGRectMake(0, 0, _rating/5.0*65, 23);}
0 0
- 星星,停靠模式
- 停靠模式
- 停靠模式
- 停靠模式动画效果
- iOS 停靠模式
- IOS View的 停靠模式
- 停靠
- 星星
- 星星!
- 星星
- 星星
- 星星
- 星星
- 星星
- 星星
- 星星
- 星星
- 星星
- ANSI C和POSIX
- Auto-Reload Your Vimrc
- hdu 1536 OR poj 2960 S-Nim 博弈论,,求出SG'函数就可以解决
- 对NSOperation/NSOperationQueue的理解
- X的二进制长度
- 星星,停靠模式
- 问题解决索引20150226
- 固定主角出生点——对象层的使用
- Android 开发学习小结
- 手动创建和挂载swap 分区
- 【2014年终总结】拼搏点缀时光,在你我最美的年华
- 第一次开通博客
- 基于Freemarker的eclipse plugin代码生成器插件开发
- 欧拉回路