목록앱 개발/iOS (96)
나의 발자취

The bundle identifier uniquely identifies your app in Apple’s ecosystem, implying that no two apps can have the same bundle identifier. Organization Identifier: A reverse DNS string that uniquely identifies your organization. For example, if the name of your organization is XYZ, then the reverse DNS notation would become com.xyz. However, since you’re building this app for yourself, you can use ..
A wireframe is a collection of sketches and notes that depict a website as it would look on a browser, a tablet, or a mobile device. It shows the layout of the app’s elements, like navigation bars, buttons, content placement, and more—it’s like the blueprint to our app! Good artists copy. Great artists steal. 복합연산자 영어로 compound assignment operators var dollars = 5 dollars += 4 // same as dollars..

ㅋㅋ.. 백만년만의 포스팅이다 이제까지 마음속 접어두었던 iOS를 기초부터 차근차근 다시 공부하려고 한다. 처음 iOS 스유를 공부하면 선언형과 명령형에 대해 언급이 되곤 한다. 일단, 선언형(declarative)과 명령형(imperative)에 대해 되게 쉽게 설명해놓은 짤로 시작. 이와 같이 명령형은 당연히 컴파일러에게 세밀하게 적시하기 때문에 컴파일 시간이 적게 걸리는 대신, 선언형은 시간이 좀 걸린다. UI kit을 사용하는 앱은 명령형(imperative) 프로그래밍을 따른다. 이것은 일련의 명령들이 specify되어있어서 프로그램이 어떻게 작동해야하는지에 포커스를 하는 것이고, 스유(Swift UI)같은 경우는 선언형(declarative) 프로그래밍을 따르는데, 문제를 해결하기 위해 개별적..

Background 마우스로 선택 후 constraints 설정 -> 오른쪽 attribute inspector에서 Second Item을 Superview로 변경 Auto Layout :: it's all about Alignment and Pinning

shut up and just type #imageLiteral( 다른 방법 다 시도했는데도 안됐는데, 꼭! 반드시 중간에 L 대문자로 써주고 괄호까지 열어주어야 이미지로 나타난다.

IB Outlet을 연결해서 이름을 설정해놓고 그 이름을 임의로 바꾸면 빌드 시 에러가 난다. 현재 주사위 한개짜리의 이미지는 diceImageView1이라고 설정했다. 하지만 해당 이름을 바꿨을 시, 빌드가 되지 않고 에러가 난다. Main > Open As > Source Code 를 보면, 스토리보드에서 드래그앤 드롭으로 편하게 설정해놓았던 UI가 모두 소스코드로 작성되어있는것을 볼 수 있다. 아래에서 현재 outlet property는 diceImageView1라고 되어있기 때문에 빌드를 실행할 때 해당 값을 찾지 못하면 에러가 난다. 이렇게 일부가 변경되어 빌드가 실행이 안될 시, 리팩토링 기능을 통해 해당 프로퍼티 값들의 이름을 일괄로 바꿔준다.

Window > Devices and Simulators 선택 Connect via Network 에 체크 단, 같은 무선랜에 연결되어있어야한다!
초기화(initialization) 와 생성자(initializer) /**===================================================================== - 초기화는 클래스, 구조체, 열거형의 인스턴스를 생성하는 과정임 - 각 "저장 속성"에 대한 초기값을 설정하여 인스턴스를 사용가능한 상태로 만드는 것 (열거형은 저장속성이 존재하지 않으므로, case중에 한가지를 선택 및 생성) - 결국, 이니셜라이저의 실행이 완료되었을 때, - 인스턴스의 모든 저장속성이 초기값을 가지는 것이 ==> 생성자(Initializer)의 역할 - 참고) 소멸자 - 생성자와 반대개념의 소멸자(Deinitializer)도 있음 - 소멸자 ==> 인스턴스가 해제되기 전에 해야할 기능..