【发布时间】:2015-11-14 18:29:05
【问题描述】:
我想在特定的段控件中禁用 UIImage Cell,因为 0 段中的所有图像都显示在第二段和第三段中
2)第二个问题:如何将表格视图中的 UIImage 的大小更改为圆形? 请在下面找到我的段控制代码
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let myCell = tableView.dequeueReusableCellWithIdentifier("myCell", forIndexPath: indexPath) as UITableViewCell
switch(mySegmentedControl.selectedSegmentIndex)
{
case 0 :
myCell.textLabel?.text = example1[indexPath.row] as? String
myCell.imageView?.image = images[indexPath.row]
break
case 1 :
myCell.textLabel?.text = example2[indexPath.row] as? String
break
case 2 :
myCell.textLabel?.text = example3[indexPath.row] as? String
break
default:
break
}
return myCell
}
【问题讨论】:
标签: swift uitableview uisegmentedcontrol