2017. 4. 2. 23:46ㆍ아이폰 개발
* Swift 3 데이터 갱신 후, UI 업데이트 방법
* Swift 3 테이블뷰 이미지 다운로드 처리 방법
서드파티 라이브러리를 사용하지 않고 구현하는 방법
* Swift 다른 뷰컨트롤러 실행하는 방법
http://stackoverflow.com/questions/38045161/switching-view-controllers-in-swift
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("mainVC")
self.presentViewController(vc, animated: true, completion: nil)
* Swift 다른 뷰컨트롤러에 데이터 전달하는 방법
https://code.tutsplus.com/tutorials/ios-sdk-passing-data-between-controllers-in-swift--cms-27151
* TextField 입력 중일 때 처리하는 방법
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string == "" {
// handle backspace scenario here
return true
} else if var textString = textField.text {
let unitString = "kg"
if textString.contains(unitString) {
textString = textString.replacingOccurrences(of: unitString, with: "")
textString += string + unitString
textField.text = textString
} else {
textField.text = string + unitString
}
return false
}
return true
}
http://stackoverflow.com/questions/41582660/swift-3-append-to-uitextfield-while-editing-changed
* 이메일 주소 유효성 체크
http://swiftdeveloperblog.com/email-address-validation-in-swift/
* 키보드 상태에 따라 오토레이아웃 처리
* 카메라 연동 기능 구현
http://stackoverflow.com/questions/41750796/camera-ios-10-2-swift-3
* iOS 10 스케쥴 타이머 사용
http://stackoverflow.com/questions/38695802/timer-scheduledtimer-swift-3-pre-ios-10-compatibility
* Compress PNG Error 관련
http://stackoverflow.com/questions/2051947/how-can-i-skip-compressing-one-png
* 라운드 이미지 만들기
http://stackoverflow.com/questions/38954368/ios-swift-3-xcode8-beta-rounded-imageview
* 테이블뷰에서 제일 아래쪽으로 이동시키기
http://stackoverflow.com/questions/38886817/scroll-all-the-way-down-to-the-bottom-of-uitableview
* 임의의 색깔 지정하기
http://stackoverflow.com/questions/38558361/custom-color-swift
* 오디오 플레이시, 시간 정보 가져오기
http://stackoverflow.com/questions/37972759/how-to-make-slider-value-change-object-or-function
* How to parse JSON with Swift 3
http://roadfiresoftware.com/2016/12/how-to-parse-json-with-swift-3/
https://developer.apple.com/swift/blog/?id=37
http://stackoverflow.com/questions/40676847/sending-json-post-request-in-swift3
* HTTP Requests in Swift 3
http://stackoverflow.com/questions/38292793/http-requests-in-swift-3
* Swift Async Load Image
http://stackoverflow.com/questions/37018916/swift-async-load-image
* Swift 문자열 길이 구하는 법
http://stackoverflow.com/questions/39267428/how-do-i-get-the-length-of-a-string-in-swift3-on-macos
if purchaseDateString.characters.count == 0 {
purchaseDateString = "n/a"
}
* Swift 문자열 Split 방법
http://stackoverflow.com/questions/25678373/swift-split-a-string-into-an-array
let fullName = "First Last"
var fullNameArr = fullName.components(separatedBy: " ")
var firstname = fullNameArr[0] // First
var lastname = fullNameArr[1] // Last
* URL 객체가 nil이 될 때
http://stackoverflow.com/questions/39539713/url-nil-after-upgrade-to-swift-3-0
if let correctedAddress = firstResult.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let url = URL(string: "https://maps.googleapis.com/maps/api/geocode/json?address=\(correctedAddress)") {
print(url)
}
* NSUserDefaults (SharedPreferences) 사용 방법
https://advancetechtutorial.blogspot.kr/2016/08/using-nsuserdefaultssharedpreferences.html