有两个UIView,需要绘制一个矩形,或获取两个UIView框架最小的矩形。
UIView
应该怎么实现?
收起
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
支付金额 15 元
提供问题酬金的用户不参与问题酬金结算和分配
支付即为同意 《付费问题酬金结算规则》
问题描述不明确。 如果在UIView中绘制矩形,在-(void)drawRect 中来画。
-(void)drawRect { CGRect rect=self.bounds; CGContextRef context=UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context,[UIColor redColor].CGColor); CGContextSetFillRect (context, rect); }
报告相同问题?