我正在尝试将阴影和角点半径设置为tableView。cornerRadius工作正常,但shadowOffset不工作:
CGRect shadowFrame = self.mainTableView.layer.bounds;
CGPathRef shadowPath = [UIBezierPath bezierPathWithRect:shadowFrame].CGPath;
self.mainTableView.layer.shadowPath = shadowPath;
self.mainTableView.layer.shadowColor = [UIColor blackColor].CGColor;
self.mainTableView.layer.shadowOffset = CGSizeMake(0, 1);
self.mainTableView.layer.shadowOpacity = 4.0;
self.mainTableView.layer.shadowRadius = 7.0;有什么想法吗?
发布于 2012-01-11 19:15:21
你试过吗?
self.mainTableView.layer.masksToBounds = NO;发布于 2013-02-08 01:50:38
基本上,要实现这一点,您需要使用两个视图。
https://stackoverflow.com/questions/8704669
复制相似问题