728x90
๋ฒํผ ๊ธฐ๋ฅ ๊ตฌํ์ ํ์ํ Event ํจ์๋ค์ ์ ๋ฆฌํด๋ณด์.
[UIControl.Event]
ํจ์ ์ฝ๋ | ํ๋ ์ผ |
static var touchDown: UIControl.Event | A touch-down event in the control. ํด๋ฆญํ์ ๋ |
static var touchDownRepeat: UIControl.Event | A repeated touch-down event in the control; for this event the value of the UITouch tapCount method is greater than one. ๋ฐ๋ณตํด๋ฆญํ ๋ |
static var touchDragInside: UIControl.Event | An event where a finger is dragged inside the bounds of the control. ๋ฒํผ ์์ญ ์์์ ๋๋๊ทธ ํ ๋ |
static var touchDragOutside: UIControl.Event | An event where a finger is dragged just outside the bounds of the control. ๋ฒํผ ์์ญ ๋ฐ์ผ๋ก ๋๋๊ทธํ์ ๋ |
static var touchDragEnter: UIControl.Event | An event where a finger is dragged into the bounds of the control. ๋ฒํผ ์์ญ ์์ผ๋ก ๋๋๊ทธํ์ ๋ |
static var touchDragExit: UIControl.Event | An event where a finger is dragged from within a control to outside its bounds. ๋ฒํผ ์์ญ ์์์ ๋๋๊ทธ ๋๋ฌ์ ๋ |
static var touchUpInside: UIControl.Event | A touch-up event in the control where the finger is inside the bounds of the control. ๋ฒํผ ํด๋ฆญ ํ ๋์ ๋ |
static var touchUpOutside: UIControl.Event | A touch-up event in the control where the finger is outside the bounds of the control. ๋ฒํผ ํด๋ฆญ ํ ๋ฒํผ ๋ฐ์์ ์ ๋์ ๋ |
static var touchCancel: UIControl.Event | A system event canceling the current touches for the control. ๋ฒํผ ํด๋ฆญ ์ทจ์ํ ๋ |
static varvalueChanged: UIControl.Event | A touch dragging or otherwise manipulating a control, causing it to emit a series of different values. ๋ฒํผ ์ด๋ฒคํธ ๊ฐ์ด ๋ณ๊ฒฝ๋ ๋ |
์์ธํ ๊ฑด ๊ณต์๋ฌธ์ ์ฐธ์กฐ-!
https://developer.apple.com/documentation/uikit/uicontrol/event
์๊ฑธ ๋ฐํ์ผ๋ก ๋ฒํผ์ ํด๋ฆญํ ๋๋ง๋ค ํฌ๋ช ๋ alpha ๊ฐ์ 1 -> 0.5 -> 1 ๋ก ๋ณํ์ํค๋ ๊ธฐ๋ฅ์ ๋ง๋ค์ด๋ณด์.
1. ๋ฒํผ ์์ฑ์์ Event ๋ชฉ๋ก์์ Touch Up Inside, Touch Down ์ ์ ํํด์ ๊ฐ๊ฐ ํจ์๋ฅผ ๋ง๋ค์ด์ค๋ค.
2. ๊ทธ๋ผ ์๋์ ๊ฐ์ด Key์ ํจ์ ๋๊ฐ๊ฐ ๋ฌ๋ฆฐ ๋ชจ์ต์ ๋ณผ ์ ์๋ค.
3. ๋๋ ธ์ ๋ alpha = 0.5, ๋์ ๋ alpha = 1 ๋ก ์ฝ๋ ๊ตฌํํด์ฃผ๊ธฐ.
4. ์์ฑ
728x90