Paste_Image.png
- (void)layoutSubviews {
[super layoutSubviews];
for (UIView *subView in self.subviews){
if([subView isKindOfClass:NSClassFromString(@"UITableViewCellDeleteConfirmationView")]) {
CGRect cRect = subView.frame;
cRect.size.height = self.contentView.frame.size.height - 10;
cRect.origin.y = 10;
subView.frame = cRect;
UIView *confirmView=(UIView *)[subView.subviews firstObject];
// 改背景颜色
confirmView.backgroundColor=[UIColor colorWithRed:254/255.0 green:85/255.0 blue:46/255.0 alpha:1];
for(UIView *sub in confirmView.subviews){
if([sub isKindOfClass:NSClassFromString(@"UIButtonLabel")]){
UILabel *deleteLabel=(UILabel *)sub;
// 改删除按钮的字体
deleteLabel.font=[UIFont boldSystemFontOfSize:15];
// 改删除按钮的文字
deleteLabel.text=@"删除";
}
}
break;
}
}
}
网友评论