我有一个容器视图,@property (weak, nonatomic) IBOutlet UIView *containerView;
,但是当我设置它的框架时,它不会移动。这是我尝试的方法:
- (void)setFramesForCategories
{
CGRect frame = _containerView.frame;
frame.origin.x = 20;
frame.origin.y = self.view.frame.size.height - 52;
frame.size.width = 236;
frame.size.height = 60 * [[_dataDict objectForKey:@"Key"] count];
_containerView.frame = frame;
}
我知道这很基础,而且在我以前移动编程创建的对象时它曾经起作用,但现在对我来说不起作用了。