评分 星星视图
来源:互联网 发布:电力工程计价软件 编辑:程序博客网 时间:2024/05/16 14:44
self.startArray = [[NSMutableArray alloc] init];
self.startView = [[UIView alloc] initWithFrame:
CGRectMake(self.shopImgView.origin.x,
self.shopImgView.origin.y + self.shopImgView.height + 10,
self.shopImgView.width,
bgView.height - self.shopImgView.origin.y - self.shopImgView.height)];
for (int i = 0; i < 5; i++)
{
UIImage *img = [UIImage imageNamed: @"start_none"];
UIImageView *imgView = [[UIImageView alloc] initWithFrame: CGRectMake(i * 17 + 5, 0, 15, 13)];
[imgView setImage: img];
[self.startArray addObject: imgView];
[self.startView addSubview: imgView];
}
float f = [model.praise floatValue]/20;
int backTwoInt = (int)(f * 100) % 100;
int startNum = floorf(f);
//NSLog(@"startNum:%d",startNum);
if (startNum > 5) {
startNum = 5;
}
for (int i = 0; i < startNum; i ++)
{
UIImageView *imgView = [self.startArray objectAtIndex: i];
[imgView setImage: [UIImage imageNamed: @"start_all"]];
}
if (backTwoInt >= 50)
{
if (startNum == 5)
{
return;
}
UIImageView *imgView = [self.startArray objectAtIndex: startNum];
[imgView setImage: [UIImage imageNamed: @"start_half"]];
}
else
{
if (startNum == 5)
{
return;
}
UIImageView *imgView = [self.startArray objectAtIndex: startNum];
[imgView setImage: [UIImage imageNamed: @"start_none"]];
}
- 评分 星星视图
- 封装星星评分视图
- 星星评分视图
- iOS中的星星评分功能视图实现
- 评分星星
- 评分星星
- 星星评分
- 星星评分
- 星星评分
- 星星评分
- iOS 星星评分评分控件
- Jquery星星评分特效
- js实现星星评分
- 评分星星的CSS
- css 手写评分星星
- 星星评分定制
- 评分星星New Version
- 网站星星评分效果
- 蛤玮的机房
- HTTP返回码总结
- hotspot虚拟机中的对象是如何布局的
- 算法训练 P1103 复数运算
- hibernate各种查询
- 评分 星星视图
- 为openvpn创建tap虚拟网卡
- Android中视频录制常见问题
- LeetCode 第 191 题 (Number of 1 Bits)
- DrawerLayout 模仿google官方左滑,menu内容延伸到通知栏
- Linux下装无线网卡(Ubuntu)
- android设计模式的使用之观察者模式
- crontab--定时器命令
- ns3中路由协议仿真的shell脚本编写