본문 바로가기

iOS14

Swift: A Swift Tour - Objects and Classes Use class followed by the class’s name to create a class.= 'class' 뒤에 클래스 이름을 사용을해서 클래스를 만들 수 있다A property declaration in a class is written the same way as a constant or variable declaration, except that it’s in the context of a class.= 클래스에서 프로퍼티 선언은 클래스의 문장 안에 있다는 것을 제외하고는 상수나 변수 선언과 같은 방식으로 작성된다Likewise, method and function declarations are written the same way.= 메소드와 함수 선언도 같은 방식이다ex)class .. 2023. 7. 13.
Swift: A Swift Tour - Functions and Closures Use func to declare a function.= 함수를 선언하기 위해 'func'을 사용한다Call a function by following its name with a list of arguments in parentheses.= 함수의 이름과 괄호 안의 인수 목록을 통해 함수를 호출한다※인수(Argument)와 인자(매개변수, Parameter)의 차이인수: 함수를 호출할 때, 사용되는 값인자: 함수를 정의할 때, 사용되는 값Use -> to separate the parameter names and types from the function’s return type.= '->'를 사용해서 '매개변수의 이름과 타입'과 '함수의 리턴 타입'을 분리한다ex)func hello(name: St.. 2023. 4. 25.
Xcode: 설치하기 Xcode를 설치하는 방법은 2가지 정도가 있다.App Store 앱Apple Developer 홈페이지1번을 통해 설치하면 편리하지만, 무조건 최신버전을 설치해야한다는 단점이 있다.개발을 하면서 느낀점이 최신버전은 위험하다는 것...2번을 통해서 설치하면 1번에 비해 번거롭지만, 원하는 버전을 설치할 수 있기에2번 방법으로 설치하는 방법을 알아볼 것이다. 우선 자신에게 맞는 Xcode의 버전을 찾아야한다.https://developer.apple.com/kr/support/xcode/ Xcode - 지원 - Apple Developer포럼 Apple 엔지니어 및 다른 개발자에게 개발 주제에 관해 질문하고 이야기를 나눌 수 있습니다. 포럼 보기(영문)developer.apple.com위 링크에서 Xcod.. 2023. 4. 13.
Swift: A Swift Tour - Control Flow Use if and switch to make conditionals, and use for-in, while, and repeat-while to make loops.= 'if'와 'switch'를 사용해서 조건을 만들고, 'for-in', 'while', 그리고 'repeat-while'를 사용해서 루프를 만든다Parentheses around the condition or loop variable are optional.= 조건이나 루프 변수 주위의 괄호는 선택사항이다Braces around the body are required.= 바디 부분을 둘러싼 중괄호는 필수다In an if statement, the conditional must be a Boolean expression= if 구문에서 .. 2023. 4. 10.