Skip to content

Commit ab57cbb

Browse files
committed
阴影效果
1 parent 105e9e2 commit ab57cbb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

GraphicsPerformance-Starter/GraphicsPerformance-Starter/CustomTableCell.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class CustomTableCell: UITableViewCell {
1414

1515
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
1616
super.init(style: style, reuseIdentifier: reuseIdentifier)
17+
18+
imgView.layer.shadowColor = UIColor.blackColor().CGColor
19+
imgView.layer.shadowOpacity = 1
20+
imgView.layer.shadowRadius = 2
21+
imgView.layer.shadowOffset = CGSizeMake(1, 1)
22+
1723
label.layer.shouldRasterize = true
1824

1925
self.contentView.addSubview(imgView)

0 commit comments

Comments
 (0)