我想要两个自定义(即子类)的UIViews在子类UITableViewCell中,如下图所示。这两个UIViews是相同的子类。自定义的UIView在自定义的UITableViewCell
两个自定义UIViews和TableViewCell有关联的厦门国际银行的。
我会很感激一些关于这方面最好的方法的建议。我用这种方式加载TableViewCell。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath (NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CustomCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:NULL];
// CustomCell is an IBOutlet connected to the above nib
cell = BLCustomCell;
}
// configure the cell
}
我想在自定义视图中设置插座以轻松显示来自我的数据模型的数据。我是否需要自定义视图的视图控制器?我无法使用自定义视图加载笔尖。 (是的,我意识到我的代码上面没有解决这个问题。)我如何得到它加载? TableView的控制器是否需要自定义视图对象的出口?
谢谢!
嗯,这取决于。你要在customViews上显示什么样的信息?你能给我一个提示,以便我能更好地理解你。 – Peres