【发布时间】:2013-04-29 11:44:30
【问题描述】:
我有CustomCellView,这是表格视图中单元格的自定义视图。我在 xib 中有 UIButton 并在 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
【问题讨论】:
标签: objective-c uitableview uibutton frame