質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,12 +14,13 @@
|
|
14
14
|
|
15
15
|
func printTappedCellIndexPath(tappedBtn: UIButton) {
|
16
16
|
|
17
|
-
print(
|
17
|
+
print(tappedBtn) // => frame: = (257.667 60; 60 30)
|
18
18
|
|
19
19
|
//タップされたボタンの乗っているセルのインデックスパスを取得する
|
20
20
|
let point = tTableView.convert(tappedBtn.center, from: tappedBtn)
|
21
21
|
|
22
|
+
print(tTableView.frame) //=> (18.666666666666657, 63.99999999999997, 337.6666666666667, 440.3333333333333)
|
22
|
-
print(
|
23
|
+
print(point) // => point: (545.3333333333334, 285.0) xがやたら大きい
|
23
24
|
|
24
25
|
// 座標からindexPathを取得する =>ここでnil
|
25
26
|
guard let indexPath = tTableView.indexPathForRow(at: point) else { return }
|