iOS/Xcode, UI

    Notification(1) - NotificationCenter 사용하기

    Notification(1) - NotificationCenter 사용하기

    (Macbook Air M1 8-256 Monterey 12.6.2 Xcode 13.4) Why? 매주 스터디에서 주제를 정해서 그 주제에 대한 발표를 진행하고 있는데, 이번에 ' Notification '을 맡게 되었습니다. 그래서 이번 포스팅에서는 Notification 사용에 대해 알아보겠습니다. 크게 (1) Notification (2) NotificationCenter (3) 사용법 (4) 어떤 상황에서 사용할까? 순으로 작성되었습니다. (1) Notification 보통 Noti를 사용한다.라고 이야기를 하면 크게 2가지 의미로 받아들일 수 있을 것 같습니다. 1. Event를 전달한다. 2. 사용자 알림 push를 전달 remote 이 중 Event를 전달하는 내용을 포스팅해보려고 합니다. ..

    Alert Controller 사용하기

    Alert Controller 사용하기

    (Macbook Air M1 8-256 Monterey 12.6.2 Xcode 13.4) Why? 매주 스터디에서 주제를 정해서 그 주제에 대한 발표를 진행하고 있는데, 이번에 ' Alert Controller '를 맡게 되었습니다. 그래서 이번 포스팅에서는 Alert Controller 사용에 대해 알아보겠습니다. 크게 (1) sheet 방식의 차이 (2) style의 차이 (3) 재사용성 (4) Custom Alert Controller 순으로 작성되었습니다. Alert Controller swift에서 기본으로 제공하는 UIAlertController을 사용하는 것을 의미합니다. swift에서 alert controller를 사용하는 순서는 다음과 같습니다. (1) UIAlertController를..

    present closure처럼 pushViewController로는 쓸 수 없는걸까?

    present closure처럼 pushViewController로는 쓸 수 없는걸까?

    (Macbook Air M1 8-256 Monterey 12.6.2 Xcode 13.4) Why? 일반적으로 다른 ViewController로 넘어갈 때, 대표적으로 present(viewcontroller: , completion: ) method를 사용하여, closure형태로 다른 ViewController에게 할 일을 시키거나 Data 전달하는 형태를 많이 볼 수 있습니다. 하지만 Navigation Controller에 존재하는 pushviewcontroller는 parameter가 ViewController와 animation밖에 없습니다. 그래서 navigation형태에서는 즉, " pushviewcontroller형태에서는 closure를 사용하여 다음 뷰컨에 Data를 전달할 수 없는걸까..

    TableView Top(header) Padding 제거

    TableView Top(header) Padding 제거

    (Macbook Air M1 8-256 Monterey 12.5.1 Xcode 13.3) Why? 앱을 구현하고 있는 도중 다음과 같은 공백을 발견했습니다. 상단에는 NavigationBar가 있고, 밑에는 TableView가 있는 ViewController입니다. 분명 예전에 구현했을 때 이런 issue가 없었던 것 같은데...(?) 분명 제약을 제대로 설정했는데도 불구하고, 왜 이런 공백이 나오나 싶어서 구글링한 결과 다음과 같은 해결방법을 찾을 수 있었습니다. 해결방법 이 issue는 padding issue, tableview header gap issue, navigateionbar bottom space view top issue, navigationbar bottom view top not ..