我有一个 UIView,我想将它上移 50。
我写了以下内容:
NSLog(@"before %@",NSStringFromCGRect(_flixSuggestionsView.frame));
_flixSuggestionsView.frame = CGRectMake(_flixSuggestionsView.frame.origin.x, _flixSuggestionsView.frame.origin.y-45, _flixSuggestionsView.frame.size.width, _flixSuggestionsView.frame.size.height);
NSLog(@"after %@",NSStringFromCGRect(_flixSuggestionsView.frame));
输出是:
before {{0, 175}, {320, 324}}
after {{0, 130}, {320, 324}}
但是 UIView 保持在同一个位置。
我错过了什么?