我有一个配置 UITableView 可以通过 UINavigationController 方法启动颜色选择器:
[self.navigationController pushViewController:colorPickerViewController animated:YES];
[colorPickerViewController release];
这意味着 ColourPicker 将在顶部有一个导航栏(和后退按钮)
ColourPickerViewControll 及其视图 ColourPickerView 的结构如下:
- ColourPickerViewController - in it's XIB file at the top level view it has:
- ColorPickerView : UIView (i.e. custom UI view) - in it's methods it has:
- (id)initWithCoder:(NSCoder*)coder {
if ((self = [super initWithCoder:coder])) {
CGFloat currVertBounds = self.bounds.size.height;
这里的问题是 currVertBounds 的值即将达到 480,所以它没有考虑导航栏
问题:如何获得 ColorPickerView 实例的真实显示高度?
是否与尝试在自定义 UIView 中计算布局有关,并且可能在那个阶段自定义视图未在整体 controll/navigationController 中呈现?