回答編集履歴
2
不要コード削除
answer
CHANGED
@@ -30,7 +30,6 @@
|
|
30
30
|
|
31
31
|
// 画像ボタン
|
32
32
|
let sButton = UIButton(frame: shadowView.bounds)
|
33
|
-
sButton.backgroundColor = UIColor.blue
|
34
33
|
sButton.setBackgroundImage(sButtonImage, for: [])
|
35
34
|
sButton.layer.cornerRadius = 10
|
36
35
|
sButton.layer.masksToBounds = true
|
1
コード修正
answer
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
``` swift
|
23
23
|
// 影表示用のビュー
|
24
24
|
let shadowView = UIView(frame: CGRect(x: 0, y: 0, width: 360, height: 200 ))
|
25
|
+
shadowView.center = CGPoint(x: 375/2, y: 200)
|
25
26
|
shadowView.layer.shadowColor = UIColor.black.cgColor
|
26
27
|
shadowView.layer.shadowOpacity = 0.5
|
27
28
|
shadowView.layer.shadowOffset = CGSize(width: 5, height: 5)
|
@@ -31,7 +32,6 @@
|
|
31
32
|
let sButton = UIButton(frame: shadowView.bounds)
|
32
33
|
sButton.backgroundColor = UIColor.blue
|
33
34
|
sButton.setBackgroundImage(sButtonImage, for: [])
|
34
|
-
sButton.center = CGPoint(x: 375/2, y: 200)
|
35
35
|
sButton.layer.cornerRadius = 10
|
36
36
|
sButton.layer.masksToBounds = true
|
37
37
|
|