変更にエラーあいまいな参照複数選択ボタンのスタイルレポートテーブル内のメンバー「サブビュー」
NSArray *subviews = [[tableView cellForRowAtIndexPath:indexPath] subviews];/* An array of */
for (id subCell in subviews) {
if ([subCell isKindOfClass:[UIControl class]]) {
for (UIImageView *circleImage in [subCell subviews]) {
circleImage.image = [UIImage imageNamed:@"CellButtonSelected"];
}
}
}
/* change */
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) /* table Proxy method */
var subviews = tableView.cellForRowAtIndexPath(indexPath)!.subviews
for subCell: AnyObject in subviews {
if (subCell is UIControl) {
for circleImage: UIImageView in subCell.subviews { /* report an error Ambiguous reference to member 'subviews' */
/* How to solve?*/
circleImage.image = UIImage(named: "CellButtonSelected")!
}
}
}
レポートメンバーにエラーがあいまいな参照「サブビュー」たぶん
/**Swift, the table of custom boxes, no system, how to change/
あなたのコードがありますObjCとSwiftの混在...私はそれが迅速または客観的な-cコンパイラの下でコンパイルできるとは思わない... – Sweeper
私はswiftでプログラミングしていますが、問題はありませんが、速やかにエラー – user7357445