앱 개발자 3

[iOS / UIKit] How to add 'done' button on keyboard

UITextField나 UITextView 우측 상단에 '완료' 버튼을 넣는 방법을 알아봅시다! 기본적으로 이렇게 키보드가 올라왔을 때는 아무런 버튼이 없습니다. 여기에 타이핑을 끝낸 후 키보드를 내릴 '완료' 버튼을 달면 이렇게 보입니다! 어떻게 만들었을까요? 바로 코드를 봅시다! 짐작하시겠지만 UITextField뿐만 아니라 UITextView에도 같은 방식으로 적용 가능하십니다! GitHub에 전체 Code 올려두었습니다! https://github.com/TDCIAN/HowToAddDoneButtonOniOSKeyboard GitHub - TDCIAN/HowToAddDoneButtonOniOSKeyboard Contribute to TDCIAN/HowToAddDoneButtonOniOSKeyboa..

iOS/UIKit 2023.03.06

[iOS / UIKit] How to detect when the application state become foreground from the background in ViewController not SceneDelegate

안녕하세요! 오늘은 앱이 background 상태에 있다가 foreground로 올라오는 것을 SceneDelegate가 아니라 ViewController에서 확인하는 방법을 알아봅시다! 다들 아시다시피 SceneDelegate를 통해 우리는 앱이 Background에서 Foreground로 넘어오는 것을 확인할 수 있습니다. 물론 그 반대도 가능합니다! 하지만 특정 ViewController에서 Foreground로 넘어오는 것을 확인하는 게 필요한 상황이 있죠? 바로 알아봅시다! willEnterForegroundNotification 옵저버를 추가해주니 ViewController에서 foreground로 들어오는 상황을 notify 해주는 게 보이네요! 그럼 background로 나가는 것도 알 수..

iOS/UIKit 2023.03.03