CustomCellView
テーブルビューのセルのカスタムビューがあります。私はUIButton
xibに持っていて、xibでデフォルトのフレームに設定しています。
( MainViewController
)viewDidLoad
内
// Get nib for custom cell
UINib *nib = [UINib nibWithNibName:@"CustomFeedCell" bundle:nil];
[self.mainTableView registerNib:nib forCellReuseIdentifier:@"CustomFeedCell"];
cellForRow で...
CustomFeedCell *cell = [self.mainTableView dequeueReusableCellWithIdentifier:@"CustomFeedCell"];
// here i need to set UIButton frame (height) depending on image height.
// I have tried diferent ways and it always return height set in CustomCellView xib