我有两个 UIView
,我需要绘制一个矩形(或)获取 UIViews
之外的最小矩形的框架。我怎样才能得到这个?
最佳答案
您可以使用:
CGRect smallestRectangle = CGRectUnion(view1.frame, view2.frame);
根据docs , 这个功能
Returns the smallest rectangle that contains the two source rectangles.
关于iphone - 两个 UIView 之外的最小矩形 - Objective C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17319857/