1
간단한 Tableview를 신속하게 작성하면 tableview에 아무 것도 채워지지 않습니다. 이미지가 채워집니다.신속한 테이블 뷰 데이터 모집단
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cellIdentifier = "cellIdentifier";
var cell: UITableViewCell? = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) as? UITableViewCell;
if !(cell != nil){
cell = UITableViewCell(style: UITableViewCellStyle.Subtitle,
reuseIdentifier: cellIdentifier)
}
if(indexPath.row==0){
cell!.textLabel.text = "POG Validation"
cell!.imageView.image = UIImage(named: "myImg")
}
return cell;
cell!.textLabel
의 프레임은 (0,0,0,0)입니다. 데이터가 채워지지 않습니다. 나는 당신의 컴파일 오류를 수정하면
(lldb) po cell!.textLabel;
<UITableViewLabel: 0x7ce6c510; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <_UILabelLayer: 0x7ce6c5d0>>
감사합니다, 나는 당신과 동일한 방법에 대해 그것을 고정 . 늦게 받아들이 기 죄송합니다. :-) – CalZone