티스토리 뷰
Swift 2.0
1 2 3 4 5 6 7 | import UIKit var errorAlert = UIAlertView() errorAlert.title = "로그인 실패" errorAlert.message = "e-mail과 비밀번호를 다시 확인해 주세요." errorAlert.addButtonWithTitle("확인") errorAlert.show() | cs |
Swift 3.0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | let alertController = UIAlertController(title: "평가하기", message: "보배드림 알림e에 대한 평가 또는 건의사항을 남겨주시면 더욱 발전된 알림e가 되겠습니다!!! 평가 부탁드립니다(꾸벅) 1분이면 충분합니다 ㅜㅜ", preferredStyle: .alert) // Create the actions let okAction = UIAlertAction(title: "평가로 응원하기.(O)", style: UIAlertActionStyle.default) { UIAlertAction in UIApplication.shared.openURL(NSURL(string : "https://itunes.apple.com/us/app/bobaedeulim-maemul-allime/id1164824979?l=ko&ls=1&mt=8")! as URL) NSLog("OK Pressed") } let cancelAction = UIAlertAction(title: "1분도 아깝다.(X)", style: UIAlertActionStyle.cancel) { UIAlertAction in NSLog("Cancel Pressed") } // Add the actions alertController.addAction(okAction) alertController.addAction(cancelAction) // Present the controller self.present(alertController, animated: true, completion: nil) | cs |
'IOS - SWIFT' 카테고리의 다른 글
IOS SWIFT 키보드 포커스 , 숨기기 ,리턴키 (UITextField, UITextView) (0) | 2016.01.29 |
---|---|
IOS SWIFT 상태바 색상 변경 (statusbar) (1) | 2016.01.27 |
IOS SWIFT 이미지 터치 이벤트 UIImageview touch event (1) | 2016.01.27 |
IOS SWIFT 클립보드에 문자열 복사하기(UIPasteboard) (0) | 2016.01.27 |
IOS SWIFT 전화걸기 액션 (0) | 2016.01.27 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday