본문 바로가기

프로그램/iOS16

[xcode8, Swift 3] UIScrollView 에서 UIImageView 적용하고 이미지 줌인, 줌아웃 xcode8에서 Swift 3을 이용해서 UIScrollView의 하위 View로 UIImageView 객체를 동적으로 생성한 후에 Pinch Gesture 로 이미지를 줌인, 줌아웃하는 앱을 개발해 보려고 합니다. 개발 환경xcode8, Swift3 프로젝트 생성 Project navigator 에서 Main.storyboard 파일을 선택한다. Object library 창에서 UIScrollView 객체를 끓어다가 ViewController 위에 놓는다. 메뉴 View>Assistant Editor>Show Assistant Editor 를 선택해서 ViewController.swift 를 에디터로 연다. Ctrl+UIScrollView 클릭, 드래그 해서 ViewController.swift 파일.. 2017. 1. 3.
[ iOS 9.x -> iOS 10 ] autoresizingMask 설정법 rotate시에 ScrollView의 규격을 그대로 유지하기 위한 설정 방법 [출처] ios UITableView Cell을 dequeueReusableCellWithIdentifier 통해서 조회할때 항상 nil ???|작성자 달망망이 iOS 9.x scrollView.autoresizingMask = .FlexibleWidth | .FlexibleHeight iOS 10 scrollView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 2016. 12. 23.
[xcode 8, Swift 3] 경고(Alert)창 띄우기 개발환경xcode 8, Swift 3 코드let dialog = UIAlertController(title: "제목", message: "내용", preferredStyle: .alert) let action = UIAlertAction(title: "확인", style: UIAlertActionStyle.default)dialog.addAction(action) self.present(dialog, animated: true, completion: nil) 버튼을 눌렀을 때, 작업을 하기 원하면 아래와 같이 let action = UIAlertAction(title: "확인", style: UIAlertActionStyle.default){ (action: UIAlertAction) -> Void in.. 2016. 12. 22.
xcode 8 을 위한 사이즈 클래스 소개 iOS 8의 적응형 UIAN INTRODUCTION TO SIZE CLASSES FOR XCODE 8https://www.youtube.com/watch?v=srXBcfhsRUk&t=924sXcode 8 에서 Auto Layout 사용 중 "Initial device view" 선택 후 레이아웃 깨지는 경우 2016. 12. 6.
Swift 3.0 에서 달라지거나 새로워진 내용들 enums 와 속성들을 위해 UpperCamelCase 가 lowerCamelCase 로 대체 되었습니다.Swift 2.2는 NSURLRequest (URL : someURL)를 사용하여 NSURLRequest 객체를 생성했습니다.Swift 3 에서는 이것을 URLRequest (url : someURL)로 다시 작성되었습니다. webView.request?.url?.absoluteString 을 이용해서 webView의 URL을 읽을 수 있다. 참고 : What's new in Swift 3.0 2016. 12. 3.
[ iOS 9.x -> iOS 10 ] UIFont.preferredFontForTextStyle UIFont.preferredFontForTextStyle은 미리 설정된 폰트 정보를 반환한다. iOS 9.x UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline) iOS 10 UIFont.preferredFont(forTextStyle: UIFontTextStyle.headline) [출처] [swift] UILabel, UITextView 에 스타일 적용하기|작성자 프리돔 2016. 12. 1.
iOS 10의 변화점 레퍼런스 : 개발자 입장에서 본 iOS 10의 변화점 2016. 11. 30.