cell 控制子控件的显示和隐藏

来源:互联网 发布:linux accept源码 编辑:程序博客网 时间:2024/05/29 15:02




-(void)showRightDot:(BOOL)isShow{    UIImageView *dotView = [self.contentView viewWithTag:701];        if (isShow) {                if (!dotView) {            dotView = [[UIImageView alloc] initWithFrame:CGRectMake(IPHONE_WIDTH - 3*kLeftInsect, CGRectGetHeight(self.frame)/2 - kRedDotWidth/2, kRedDotWidth, kRedDotWidth)];            dotView.tag = 701;            [dotView setCornerRadius:kRedDotWidth/2.0];            dotView.backgroundColor = [UIColor redColor];            [self.contentView addSubview:dotView];        }            }else{                if (dotView) {            [dotView removeFromSuperview];        }            }        }

0 0
原创粉丝点击