質問編集履歴

3

完成イメージ添付

2018/10/25 04:08

投稿

hiro_ns
hiro_ns

スコア12

test CHANGED
File without changes
test CHANGED
@@ -105,3 +105,9 @@
105
105
 
106
106
 
107
107
  ![VOL_OFF](4951f7f93ca6c866e0f2edf8806a6df0.png)
108
+
109
+
110
+
111
+ ## 完成イメージ
112
+
113
+ ![イメージ説明](8a706ced68b28fa35a4cfd8f63df4cae.png)

2

コメントの削除

2018/10/25 04:08

投稿

hiro_ns
hiro_ns

スコア12

test CHANGED
File without changes
test CHANGED
@@ -74,10 +74,6 @@
74
74
 
75
75
  UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
76
76
 
77
- // var context = UIGraphicsGetCurrentContext()
78
-
79
-
80
-
81
77
  self.draw(in: CGRect(x:0, y:0, width:size.width, height:size.height))
82
78
 
83
79
  let image = UIGraphicsGetImageFromCurrentImageContext()

1

情報の追加

2018/10/25 03:47

投稿

hiro_ns
hiro_ns

スコア12

test CHANGED
File without changes
test CHANGED
@@ -51,3 +51,61 @@
51
51
  ![イメージ説明](1344f78c49d7ea6547d6655de9fbaf39.jpeg)
52
52
 
53
53
  ![イメージ説明](5a3a996822e5f25afb0e789de1327393.jpeg)
54
+
55
+
56
+
57
+ # 10/25追記
58
+
59
+
60
+
61
+ ## UIImage拡張
62
+
63
+ ```
64
+
65
+ extension UIImage{
66
+
67
+ func ResizeUIImage(width : CGFloat, height : CGFloat)-> UIImage!{
68
+
69
+
70
+
71
+ let size = CGSize(width: width, height: height)
72
+
73
+
74
+
75
+ UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
76
+
77
+ // var context = UIGraphicsGetCurrentContext()
78
+
79
+
80
+
81
+ self.draw(in: CGRect(x:0, y:0, width:size.width, height:size.height))
82
+
83
+ let image = UIGraphicsGetImageFromCurrentImageContext()
84
+
85
+ UIGraphicsEndImageContext()
86
+
87
+
88
+
89
+ return image
90
+
91
+ }
92
+
93
+
94
+
95
+ }
96
+
97
+ ```
98
+
99
+
100
+
101
+ ## VOL_ONの画像
102
+
103
+ ![VOL_ON](0b51d03e0c3556357601d046fe8089df.png)
104
+
105
+
106
+
107
+ ##VOL_OFFの画像
108
+
109
+
110
+
111
+ ![VOL_OFF](4951f7f93ca6c866e0f2edf8806a6df0.png)