전체 글(31)
-
[iOS] Event & Gesture handling : PTS (Pinch-Touch&Tap-Sketch/Swipe) Pinch Example 4
지난 포스팅에 이어서 Pinch View를 구현한다. Set the Swipe View Layout 1. Library[➕]버튼을 클릭하여 Lable 가져오기 2.Lable 선택하고 하단의 Add New Constraints을 눌러 좌우 여백을 16, 상하 여백을 0으로 설정하여 화면을 꽉 채운다 3. Outlet Variable 추가 Editor 영역 상단 우측 Adjust Editor Options 버튼 > Assistant 클릭 Pinch Label: Assisttant 코드 영역으로 Drag & Drop Implement Pinch Gesture import UIKit class PinchViewController: UIViewController { @IBOutlet var pinchText: U..
2022.09.01 -
[iOS] Event & Gesture handling : PTS (Pinch-Touch&Tap-Sketch/Swipe) Swipe Example 3
지난 포스팅에 이어서 Swipe View를 구현한다. Set the Swipe View Layout 1. Library[➕]버튼을 클릭하여 Vertical Stack View 가져오기 2. Stack View 선택하고 하단의 Add New Constraints을 눌러 좌우 여백을 16으로 설정한다. 3. 하단 Align 아이콘을 클릭하고 Vertically in Container를 체크, 설정값: 0 -> 스택 뷰 화면 세로 중앙 정렬 4. Library[➕]버튼을 클릭하여 Vertical Stack View안으로 Image View, Horizontal Stack View, Image View 가져오기 5. Horizontal Stack View안에 다시 Image View 두 개 배치 6. Horiz..
2022.09.01 -
[iOS] Event & Gesture handling : PTS (Pinch-Touch&Tap-Sketch/Swipe) Sketch Example 2
지난 포스팅에 이어서 Sketch View, Swipe View를 구현한다. Set the Sketch View Layout 1. Library[➕]버튼을 클릭하여 Vertical Stack View 가져오기 2. Stack View 선택하고 하단의 Add New Constraints을 아래와 같이 세팅 3. Library[➕]버튼을 클릭하여 Button, Image View를 Stack View안에 추가 4. Button text: Clear로 변경, Add New Constraints 버튼 클릭하여 Heght: 40으로 변경 5. Outlet Variable & Action Function 추가 Editor 영역 상단 우측 Adjust Editor Options 버튼 > Assistant 클릭 Hor..
2022.08.31 -
[iOS] Event & Gesture handling : PTS (Pinch-Touch&Tap-Sketch/Swipe) Touch&Tap Example 1
iOS의 touch, tap, swipe등을 활용하여 sketch 기능이 있는 앱을 만들 것이다. touch, tap, swipe, sketch를 각각 연습할 수 있도록 각 항목에 따른 뷰를 따로 생성하여 탭 바 컨트롤러로 뷰를 선택해 화면을 이동할 수 있게 할 것이다. 각각의 사항을 이벤트와 제스쳐 핸들링을 응용하여 연습해 보도록 하자. Example 1에서는 먼저 touch와 tab 이벤트를 구현한다. 앱 구성 Xcode로 Project를 생성한 뒤, Main 스토리보드 안 아이폰 화면 전체 드래그.상단 메뉴바 [Editor -> Embed in -> Embed in -> Tab Bar Controller] 선택. ✅ Tab Bar Controller 추가 완료 Library(Editor 영역 우측 ..
2022.08.31 -
[iOS & Xcode] Initialize, 프로젝트 구성, ButtonAction, Alert
[Xcode] 실행 -> Create a new Xcode project or [Xcode] 상단바 -> File -> New -> Project -> initialize 완료! 프로젝트 구성 화면 왼쪽 네비게이터 영역 AppDelegate(.swift): App Life Cycle 관리, 앱 실행 ~ 종료/백그라운드 실행시 작업 관리 SceneDelegate(.swift): UI Life Cycle 관리 ViewController(.swift): 화면(뷰)에서 처리하는 작업 관리 -> 여기서 코딩할거임 Main(.storyboard): 스토리보드: 화면에 보이는 내용, 뷰와 뷰의 연결 관계 등을 그림으로 표현, 시각적인 이해에 도움됨 Assets(.xcassets): 앱 아이콘 저장소 -> 여기서 앱 ..
2022.08.30 -
[Android] MediaBrowserServiceCompat이용하여 MediaButtonClickEvent 구현 (feat. AudioFocus받아오기)
https://fanxy0n.tistory.com/8 [Android] MediaButtonReceiver 이용하여 Bluetooth Earbuds Button Click Event 받기 VR 특성상 사용자 입력을 받아 이벤트를 처리하는 것이 2D Display에 비해 제한적이기 때문에 어떻게 컨트롤러의 버튼 onClick 이벤트를 받을 것인지 고민이 되었다. 모바일 디바이스에서 VR 앱이라 fanxy0n.tistory.com ⬆️(이전 포스팅 참조) MediaBrowserServiceCompat을 상속받은 Service로 블루투스 earbuds의 onClickEvent를 처리하던 중 문제가 발생하였다. 그것은 바로 미디어 버튼 이벤트의 포커스가 가장 최근에 오디오 패스 열었던 앱에 한정되어 있다는 것...
2022.08.17