Objective c 我有10个UIView和setTags如何在给定的标签上使用给定的UIView?
如何在给定的标签(比如“5”)上设置“视图”的rectObjective c 我有10个UIView和setTags如何在给定的标签上使用给定的UIView?,objective-c,cocoa-touch,Objective C,Cocoa Touch,如何在给定的标签(比如“5”)上设置“视图”的rect thx您可以使用类UIView的方法检索具有给定标记的视图 UIView *viewWithTag5 = [self.view viewWithTag:5]; viewWithTag5.frame = rect; 因此,假设您的视图是self.view的子视图,您可以使用[self.view viewWithTag:5].frame=CGRectMake(…)
thx您可以使用类
UIView
的方法检索具有给定标记的视图
UIView *viewWithTag5 = [self.view viewWithTag:5];
viewWithTag5.frame = rect;
因此,假设您的视图是
self.view
的子视图,您可以使用[self.view viewWithTag:5].frame=CGRectMake(…)