Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- mdb table 합치기
- Xcode
- VBA
- 달력
- dataset
- 스위프트
- 대전 자전거
- C#
- python
- 파이썬
- insert into
- exifread
- kanna html parser
- MDB
- 엑셀
- 노은
- euc-kr
- Exif
- StreamReader
- 유성
- swift
- html parser
- 딴지일보 자유게시판 파씽
- swift html parser
- EXIF data
- 자전거
- 대전 업힐
- file move
- 대전
- kanna parser
Archives
- Today
- Total
Fly to the sky & Return
로그인 창 만들기 .......2 본문
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
UIAlertController 를 이용한 로그인 창 구현코드입니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | import UIKit class ViewController: UIViewController { @IBAction func bTnLogPw(sender: AnyObject) { let alert = UIAlertController(title: "입력", message: "로그인 정보를 입력합니다.", preferredStyle: .Alert) alert.addTextFieldWithConfigurationHandler( ){ (textField) in textField.placeholder = "Login ID" } alert.addTextFieldWithConfigurationHandler( ){ (textField) in textField.placeholder = "Password" textField.secureTextEntry = true } let cancelAction = UIAlertAction(title: "취소", style: .Cancel, handler: nil) let okAction = UIAlertAction(title: "확인", style: .Default ){ (_) in let logid = alert.textFields?[0].text let pw = alert.textFields?[1].text if logid == "1111" && pw == "2222" { } else { } } alert.addAction(cancelAction) alert.addAction(okAction) self.presentViewController(alert, animated: false, completion: nil) } } | cs |
'프로그래밍 > Swift(IOS & Mac)' 카테고리의 다른 글
옵셔널 (Optional) in Swift (0) | 2016.01.18 |
---|---|
XCODE 기본적인 사용법.......2 (0) | 2016.01.17 |
XCODE4 기본적인 사용법 알아보기....1 (0) | 2016.01.16 |
UIImagePickerController를 이용한 사진불러오기 (0) | 2016.01.14 |
[IOS] Alert을 이용한 로그인 만들기.....1 (0) | 2016.01.11 |