분류 전체보기(24)
-
[ Swift ] CG
iOS에서 뷰를 다룰 때 자주 등장하는 CGFloat, CGRect, CGPoint 등등 CG 들을 많이 봤습니다. 이 때 CG는 Core Graphics 의 약자입니다. CG에대해 가볍게 알아봅시다. Core Graphics? Core Graphics 코어 그래픽스 ( 이하 CG ) 는 2D 렌더링. 즉 2차원에서 그리는 작업에서 사용되는 개념입니다. 공식문서를 보면 Quartz기술을 사용해서 가볍고 정확하게 그릴 수 있다고 나오는데요, 보면 드로잉, 그라데이션, 색상, PDF등등 다양하고도 폭넓게 사용된다고 해요 ! 깊게 알면 좋겠으나 다름기회로 넘기고 CG는 2차원을 위해 사용되는 개념이구나, iOS에서 CG가 붙은 애들은 2차원 좌표계를 그리기 위해 사용되는 애들이겠구나, 라는 정도만 알고 넘어갑..
2020.12.29 -
[ Swift ] Keyboard 제어
키보드 컨트롤 쉽지 않지만 이것을 기억하자 ! //다른 곳 터치하면 키보드 내리기 override func touchesBegan(_ touches: Set, with event: UIEvent?) { self.view.endEditing(true) }
2020.12.21 -
[ Swift ] Table View Cell 에 stack View 를 추가해보자.
결과물 일단 UIView의 Anchor를 설정하는 함수(setAnchor)를 사용하기 위해 extension을 작성해줍니다. extension UIView { func setAnchor(top: NSLayoutYAxisAnchor?, left: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, right: NSLayoutXAxisAnchor?, paddingTop: CGFloat, paddingLeft: CGFloat, paddingBottom: CGFloat, paddingRight: CGFloat) { self.translatesAutoresizingMaskIntoConstraints = false if let top = top { self.topAnchor..
2020.11.19 -
[ Swift ] View Controller의 생명주기 ( Life - Cycle )
보호되어 있는 글입니다.
2020.11.19 -
[ Xcode ] Simulator Platform 바꾸기
아주 아찔한 경험을 했다. :0: error: unable to load standard library for target 'x86_64-apple-ios9.0-simulator' 에러가 떠서 만지다가 파일을 껐다 켰는데 Simulator가 Mac으로 되어있는것이다... 파일 설정으로 가서 Build Setting -> Supported Platform을 다시 iOS로 바꿔주면 된다.
2020.11.13 -
[ Swift ] TabBar 에 View( Segment ) 추가하기
보호되어 있는 글입니다.
2020.11.06 -
[ Swift ] Grammar
?? Double question mark is a nil-coalescing operator. In plain terms, it is just a shorthand for saying != nil First it checks if the return value is nil, if it is indeed nil, then the left value is presented, and if it is nil then the right value is presented.
2020.11.04 -
[ Swift ] font 바꾸기
www.xspdf.com/resolution/51668213.html How to change the color of the button title in Swift Uibutton title not showing swift UIButton title not displaying, I just started developing in Swift. I created an UIButton dynamically and added it to the View. My issue is the view is not displaying the button. My I just started developing in Swift. I cr www.xspdf.com font 바꾸는 자료이다! 좋은 글이지만 코드가 텍스트하고 섞여 있..
2020.11.04 -
[ Swift ] Protocol ? Extension ?
상속( inheritance ) 위임( delegate ) 프로토콜( Protocol )은 특정 역할을 수행하기 위한 메서드 , 프로퍼티, 기타 요구사항 등의 청사진을 정의합니다. 구조체, 클래스, 열거형 프로토콜은 채택( Adopted ) 해서 특정 기능을 수행하기 위한 프로토코 요구사항을 실제로 구현할 수 있습니다. 어떤 프로토콜의 요구사항을 모두 따르는 타입은 그 '프로토콜을 준수한다( Conform )'고 표현합니다. 타입에서 프로토콜의 요구사항을 충족시키려면 프로토콜이 제시하는 청사진의 기능을 모두 구현해야 합니다. 즉, 프로토콜은 기능을 정의하고 제시할 뿐이지 스스로 기능을 구현하지는 않습니다. 프로토콜 정의 프로토콜은 구조체, 클래스, 열거형의 모양과 비슷하게 정의할 수 있으며 protoco..
2020.10.30 -
[ Swift ] 단축키
Opt + command + enter >> 미리보기 창 열기 Opt + command + P >> 미리보기 실행
2020.10.27