Login
Discover
Waves
Decks
Upgrade
Login
Signup
Topics
New
Trending
Hot
New
New
Trending
Hot
New
Controversial
Rising
Promoted
swift4
gunw
swift4
Friday, January 25, 2019 7:06 AM
[Grammer] 26 - Custom Operators
Custom Operators : prefix, postfix, infix 중 하나를 커스텀 infix operator *+* : MultiplicationPrecedence // 우선순위 그룹 설정 extension Int { static func *+*(left: Int, right: Int) -> Int { return (left * right)
$ 0.000
0
1
gunw
swift4
Friday, January 25, 2019 6:26 AM
[Grammer] 25 - Operator Methods
Operator Methods static func operator(parameters) -> ReturnType { Code } struct Position { var x : Double var y : Double } extension Position { static func ==(left: Position, right: Positon) -> Bool
$ 0.000
2
gunw
swift4
Friday, January 25, 2019 5:54 AM
[Grammer] 23 - Bitwise Operators, 24 - Identity Operator
Bitwise Operators 메모리에 저장된 실제 비트를 다룸. 연산 속도가 빠르고 코드가 짧음. 비트 연산은 정수만 가능함.(실수 x, 문자열x) &, |, ^, ~, <<, >> a : 0 0 1 0 0 0 1 1 b : 0 0 0 1 1 0 1 0 & : 0 0 0 0 0 0 1 0 (AND) | : 0 0 1 1
$ 0.000
0
gunw
swift4
Friday, January 25, 2019 5:34 AM
[Grammer]21 - Ternary Coditional Operator, 22 - Range Operators
Ternary Coditional Operator : //condition ? expr1 : expr2 let condition = false let result = condition ? "eat" : "sleep" Range Operators a...b : Closed Range Operator a..<b : Half-open
$ 0.000
1
krk101
fpc
Tuesday, August 12, 2025 8:39 AM
Promoted
Nature in the city - FPC photo contest entry
At first I hesitated a bit to post these photos for contest, as park in the city, seemed to be too easy target for a topic. Finally I've decided to do so, here's why. The tree in the picture has fallen
$ 0.281
3
2
gunw
swift4
Friday, January 25, 2019 4:46 AM
[Grammer] 19 - Short-circuit Evaluation, Side Effect, 20 - Assignment Operators
Short-circuit Evaluation(단락 평가) var a = 1 var b = 2 func updateLeft() -> Bool { a += 1 return false } func updateRight() -> Bool { b += 1 return true } if updateLeft() && updateRight() {
$ 0.000
1
gunw
swift4
Friday, January 25, 2019 4:34 AM
[Grammer] 16 - Overflow Operators, 17 - Comparison Operators, 18 - Logical Operators
Overflow Operatiors &+ : Overflow Addition Operator &- : Overflow Subtraction Operator &*: Overflow Multiplication Operator let a: Int8 = Int8.max let result = a &+ 1 // -128 let b: Int8
$ 0.000
0
gunw
swift4
Friday, January 25, 2019 3:16 AM
[Grammer] 13 - Data Types with Memory, 14 - Operator Basics, 15 - Arithmetic Operators
Data Types(자료형) : 메모리에 저장되는 데이터의 크기를 결정. Primitive Data Types : [Interger, Floating-point, Boolean, Character, String] Compound Data Types : [Structure, Enumeration, Class, Tuple] Memory : 0(off)과 1(on)을
$ 0.000
0
gunw
swift4
Friday, January 25, 2019 2:47 AM
[Grammer] 11 - Type Inference, Type Safety, 12 - Type Conversion, Type Aliases
Type Inference: 타입을 값을 보고 추론함. let num = 123 Type Annotation : 타입을 직접 지정함 let num: Int = 123 Type Safety : 안정성을 위해 자료형을 엄격히 구분. 모든 타입간 호환 불가. Int+Double / Int8+Int 등 모두 에러. 이러한 계산은 형변환이 필요. Type Conversion
$ 0.000
0
chaosmagic23
LeoFinance
Thursday, August 7, 2025 3:21 PM
Promoted
Grok about LEO 2.0
Hey guys! Talking with Grok about LEO 2.0 and it's quite interesting what Grok has to say. This is the answer from Grok: Thank you for clarifying that you’re referring to the LEO token from the Hive
$ 1.675
136
5
3
gunw
swift4
Friday, January 25, 2019 2:22 AM
[Grammer] 09 - Boolean, 10 - Strings and Characters
Boolean: 참/거짓을 구분. Swift에서는 true, false 2가지만 소문자로 존재. if 조건문이나 while 반복문에 자주 사용 import UIKit let valid: true let invalid = false let hasName: Bool = true let isMember: Bool = false Strings : 문자열. "
$ 0.000
0
gunw
swift4
Friday, January 25, 2019 2:11 AM
[Grammer] 07 - Naming Convention, 08 - Numbers
Naming Conventions(이름 정의 규칙) Camel Case : UpperCamelCase와 lowerCamelCase로 구분. UpperCamelCase : Class, Structure, Enumeration, Extension, Protocol lowerCamelCase: Variable, Constant, Function, Property,
$ 0.000
2
gunw
swift4
Friday, January 25, 2019 1:55 AM
[Grammer] 06 - Scope
Scope (범위) : (전역 범위 / 지역 범위) 로 구분. 전역 범위 동일한 범위에 있는 변수와 상수에 접근할 수 있다. 동일한 범위 안에서는 이전에 선언되어있는 변수와 상수에만 접근할 수 있다. 지역 범위 지역 범위에서는 자신의 상위에서 선언된 변수와 상수에 접근할 수 있다. class 시작부분 바로 아래에는 선언 구역이라 변수, 상수에 접근할 수 없다.
$ 0.000
1
1
gunw
swift4
Friday, January 25, 2019 1:44 AM
[Grammer] 05 - Variables and Constants
Variables(변수) : Keyword, Identifier, Type, Initial Value 등을 이용함. var variableName = initialValue var name = "James" var year = 2017 var swiftVersion = 4.0 var isMale = true Constants(상수) : 값을
$ 0.000
0
davideownzall
Actifit
Monday, August 11, 2025 5:20 AM
Promoted
My Actifit Report Card: August 10 2025
First full day at holidays, woke up early, had a quick breakfast in the bungalow then immediately heading for the sea! To reach it you need to walk through a 15km long pine forest, of course you don't
$ 0.460
38
14
gunw
swift4
Friday, January 25, 2019 1:30 AM
[Grammer] 04 - First-class Citizen, Special Characters
First-class Citizen 상수와 변수에 저장할 수 있다. 파라미터로 전달할 수 있다. 함수에서 리턴할 수 있다. Special Characters : 프로그래밍에 사용되는 특수문자들 !, ~(Tilde), `(Grave Accent), @(At Symbol), #(Sharp), $(Dollar Sign) %(persent Sign), ^(Caret),
$ 0.000
0
gunw
swift4
Friday, January 25, 2019 1:24 AM
[Grammer] 03 - Compile, Link, Run
Compiler : Source Code 를 분석해 Binary Code 로 변환. 그 동작을 Compile이라 함 Link : Framwork 와 Libarary 를 연결하는 과정. Build : Compile + Link Run : Compile된 파일을 실행하는 과정.
$ 0.000
1
gunw
swift4
Friday, January 25, 2019 1:17 AM
[Grammer] 02 - Literal, Identifier, Keyword
Literals: 의미가 변하지 않고 있는 그대로 사용하는 값. (ex. 숫자(1,2,3...)) integer, Floating-point, String, Boolean, nil Literals 등 다양한 리터럴이 있음. Identifiers(식별자): 구분을 위한 이름. 아래에서 x가 identifier. let x = 4 Keywords(예약어): 프로그래밍
$ 0.000
1
gunw
swift4
Friday, January 25, 2019 1:12 AM
[Grammer] 01. Token, Expression, Statement
Token : Identifier, Kewords, Punctuations, Operators, Literals 연산자 등이 있음. 간단히 더 이상 쪼갤 수 없는 원자 라고 할 수 있음. Expression (표현식) : 산술 표현식, 논리 표현식 등이 있음. Statement(문장) : ';' 세미콜론이 필요없음.
$ 0.000
0
wiseagent
CineTV
Monday, August 11, 2025 1:13 AM
Promoted
"South Park", sharper than ever.
This publication was also writen in SPANISH and PORTUGUESE. O Globo After an intense and relatively long behind-the-scenes battle, the acclaimed and beloved animated TV series South Park has been renewed
$ 14.530
394
5
2
gunw
ios
Thursday, January 24, 2019 6:29 AM
04.Todo (date / navi)
기본 스토리보드 구성 모델파일 작성 dateFormatter를 이용한 날짜 계산 segue를 이용한 화면 전환 셀 재사용 메소드
$ 0.000
0
gunw
ios
Thursday, January 24, 2019 3:08 AM
03.facebook view
페이스북처럼 테이블뷰를 스토리보드없이 생성하는 프로젝트 특이점은 각 값을 모두 Key.swift와 같이 파일을 생성하여 다 따로 만들어주는점. AppDelegate.swift에서 루트뷰컨트롤러를 설정해주는 화면 제일 중요한 셀 생성 메소드 나머지 데이터소스와 딜리게이트는 일반적인 테이블뷰 생성과 비슷하다.
$ 0.000
0
gunw
ios
Thursday, January 24, 2019 2:07 AM
02. StopWatch
특이점은 뷰컨트롤러안에, 뷰안에 레이블을 두었고, 아래쪽에 테이블뷰를 넣었다. StopWatch.swift 를 생성하여 NSObject를 받는 클래스를 생성 버튼 모양을 동그라미로 바꿔준다.(viewDidLoad에 작성, 모양을 1:1 aspect로 바꾸어야 원이됨.) 이후 딜리게이트 메소드도 구현한다. changeButton 메소드를 구현하여 버튼 동작을
$ 0.000
1
gunw
swift4
Wednesday, January 23, 2019 6:16 AM
Project.01 TabBar / TableView / ScrollView
탭바 컨트롤을 위해 간단하게 뷰컨트롤러 2개에 임베딩을 시킨다. 이후 Product.swift 파일을 생성하여 아래와 같이 작성한다. ProductsTableViewController 테이블뷰컨트롤러를 생성한 후 Product 배열을 프로퍼티로 생성한다. 배열에 각 셀에 들어갈 내용을 작성 후 prepare메소드를 불러와서 세그로 다음 화면으로 연결한다. 각
$ 0.000
1
Top communities
Create decentralized community