
[iOS / Swift] Storyboard 간단한 로그인 기능 구현(2) 코드 개선
·
Swift Study/Storyboard
지난번에 간단한 계산기앱 코드개선을 할 때 강제언래핑한 부분을 옵셔널 바인딩으로 변경하고 아이디와 패스워드를 입력하지 않았을 때알림창(경고창)을 띄우는 코드를 추가할 것임 이건 이전 계산기앱 코드개선과 마찬가지로 하면 됨.func showAlert(message: String) { let alert = UIAlertController(title: "알림", message: message, preferredStyle: .alert) let okAction = UIAlertAction(title: "확인", style: .default) alert.addAction(okAction) present(alert, animated: t..