質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,4 +11,7 @@
|
|
11
11
|
```
|
12
12
|
このimageは配列で読み込んでいるのですが、画像の大きさがバラバラなので、はみ出して見えます。
|
13
13
|
これらの画像をリサイズして一定にしたいです。
|
14
|
-
わかる方よろしくお願いします。
|
14
|
+
わかる方よろしくお願いします。
|
15
|
+
|
16
|
+

|
17
|
+
以上のように、元画像サイズのまま表示されるため、右側がそろわず、バラバラになってしまいます
|
1
書き方の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
SwiftのtableViewにおいてimageの大きさを一定にする方法について質問します。
|
2
2
|
|
3
|
+
```lang-Swift
|
3
|
-
|
4
|
+
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
|
4
5
|
let cell = UITableViewCell(style: .Default,reuseIdentifier: "Q")
|
5
6
|
cell.textLabel!.text = place[indexPath.row]
|
6
7
|
cell.imageView!.image = img[indexPath.row]
|
7
8
|
cell.textLabel!.font = UIFont(name: "HirakakuProN-W6",size: 13)
|
8
9
|
return cell
|
9
10
|
}
|
10
|
-
|
11
|
+
```
|
11
12
|
このimageは配列で読み込んでいるのですが、画像の大きさがバラバラなので、はみ出して見えます。
|
12
13
|
これらの画像をリサイズして一定にしたいです。
|
13
14
|
わかる方よろしくお願いします。
|