Login
Discover
Waves
Communities
Login
Signup
Topics
#swift4
Global
Trending
Hot
New
Top
#swift4
New
Top communities
Create your community
latest #swift4 created topics | Ecency
gunw
swift4
8y
[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
8y
[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
8y
[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
gunw
swift4
8y
[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
rlathulerie
Home Solutions
6h
Published via Ecency
Promoted
Cocina lista... por ahora!/ Kitchen is ready... for now โ ๏ธ๐
Hello chicos! Siii, soy yo otra vez, pero ya saben que soy ansiosa a mil y no podรญa dejar de contarles que hoy finalmente terminรฉ los trabajos en mi cocina y necesitaba mostrarles cรณmo quedรณ todo. Aunque
gunw
swift4
8y
[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() {
gunw
swift4
8y
[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
gunw
swift4
8y
[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)์
gunw
swift4
8y
[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
wiseagent
Movies & TV Shows
3d
Promoted
How do you measure the quality of a movie?
This publication was also writen in SPANISH and PORTUGUESE. Giant Freakin Robot Whenever I am writing a review of a movie, I instinctively - and automatically - ask myself how I measure the quality of
gunw
swift4
8y
[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 : ๋ฌธ์์ด. "
gunw
swift4
8y
[Grammer] 07 - Naming Convention, 08 - Numbers
Naming Conventions(์ด๋ฆ ์ ์ ๊ท์น) Camel Case : UpperCamelCase์ lowerCamelCase๋ก ๊ตฌ๋ถ. UpperCamelCase : Class, Structure, Enumeration, Extension, Protocol lowerCamelCase: Variable, Constant, Function, Property,
gunw
swift4
8y
[Grammer] 06 - Scope
Scope (๋ฒ์) : (์ ์ญ ๋ฒ์ / ์ง์ญ ๋ฒ์) ๋ก ๊ตฌ๋ถ. ์ ์ญ ๋ฒ์ ๋์ผํ ๋ฒ์์ ์๋ ๋ณ์์ ์์์ ์ ๊ทผํ ์ ์๋ค. ๋์ผํ ๋ฒ์ ์์์๋ ์ด์ ์ ์ ์ธ๋์ด์๋ ๋ณ์์ ์์์๋ง ์ ๊ทผํ ์ ์๋ค. ์ง์ญ ๋ฒ์ ์ง์ญ ๋ฒ์์์๋ ์์ ์ ์์์์ ์ ์ธ๋ ๋ณ์์ ์์์ ์ ๊ทผํ ์ ์๋ค. class ์์๋ถ๋ถ ๋ฐ๋ก ์๋์๋ ์ ์ธ ๊ตฌ์ญ์ด๋ผ ๋ณ์, ์์์ ์ ๊ทผํ ์ ์๋ค.
gunw
swift4
8y
[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(์์) : ๊ฐ์
discoverireland
Team Ukraine
2d
Published via Ecency
Promoted
ะงะพะผั PIN-ะบะพะด ะผะฐั ัะฐะผะต ัะพัะธัะธ ัะธััะธ?
ะะพะปะธ ั ะฒะฟะตััะต ะฟัะพัะธัะฐะปะฐ ัั ัััะพััั, ะฝะต ะฟะพะฒััะธะปะฐ. ะะต ัะพะผั, ัะพ ัะฐะบ ัะพะทัะฐั ัะฒะฐะปะธ ะบัะธะฟัะพะณัะฐัะธ. ะะต ัะพะผั, ัะพ ัะพัะธัะธ ัะธััะธ โ ัะบะธะนัั ัะดะตะฐะปัะฝะธะน ััะฐะฝะดะฐัั ะฑะตะทะฟะตะบะธ. ะ ัะพะผั, ัะพ ะดััะถะธะฝะฐ ะฒะธะฝะฐั ัะดะฝะธะบะฐ ัะบะฐะทะฐะปะฐ: ััััั ัะธัั
gunw
swift4
8y
[Grammer] 04 - First-class Citizen, Special Characters
First-class Citizen ์์์ ๋ณ์์ ์ ์ฅํ ์ ์๋ค. ํ๋ผ๋ฏธํฐ๋ก ์ ๋ฌํ ์ ์๋ค. ํจ์์์ ๋ฆฌํดํ ์ ์๋ค. Special Characters : ํ๋ก๊ทธ๋๋ฐ์ ์ฌ์ฉ๋๋ ํน์๋ฌธ์๋ค !, ~(Tilde), `(Grave Accent), @(At Symbol), #(Sharp), $(Dollar Sign) %(persent Sign), ^(Caret),
gunw
swift4
8y
[Grammer] 03 - Compile, Link, Run
Compiler : Source Code ๋ฅผ ๋ถ์ํด Binary Code ๋ก ๋ณํ. ๊ทธ ๋์์ Compile์ด๋ผ ํจ Link : Framwork ์ Libarary ๋ฅผ ์ฐ๊ฒฐํ๋ ๊ณผ์ . Build : Compile + Link Run : Compile๋ ํ์ผ์ ์คํํ๋ ๊ณผ์ .
gunw
swift4
8y
[Grammer] 02 - Literal, Identifier, Keyword
Literals: ์๋ฏธ๊ฐ ๋ณํ์ง ์๊ณ ์๋ ๊ทธ๋๋ก ์ฌ์ฉํ๋ ๊ฐ. (ex. ์ซ์(1,2,3...)) integer, Floating-point, String, Boolean, nil Literals ๋ฑ ๋ค์ํ ๋ฆฌํฐ๋ด์ด ์์. Identifiers(์๋ณ์): ๊ตฌ๋ถ์ ์ํ ์ด๋ฆ. ์๋์์ x๊ฐ identifier. let x = 4 Keywords(์์ฝ์ด): ํ๋ก๊ทธ๋๋ฐ
gunw
swift4
8y
[Grammer] 01. Token, Expression, Statement
Token : Identifier, Kewords, Punctuations, Operators, Literals ์ฐ์ฐ์ ๋ฑ์ด ์์. ๊ฐ๋จํ ๋ ์ด์ ์ชผ๊ฐค ์ ์๋ ์์ ๋ผ๊ณ ํ ์ ์์. Expression (ํํ์) : ์ฐ์ ํํ์, ๋ ผ๋ฆฌ ํํ์ ๋ฑ์ด ์์. Statement(๋ฌธ์ฅ) : ';' ์ธ๋ฏธ์ฝ๋ก ์ด ํ์์์.
lindoro
Black And White
5d
Published via Ecency
Promoted
Monomad || Street photography.
These photos are my entry for the #monomad contest by @brumest and @monochromes. Today I want to share with you some photos I took a few days ago at a cultural event in Josรฉ Martรญ Park dedicated to the
gunw
ios
8y
04.Todo (date / navi)
๊ธฐ๋ณธ ์คํ ๋ฆฌ๋ณด๋ ๊ตฌ์ฑ ๋ชจ๋ธํ์ผ ์์ฑ dateFormatter๋ฅผ ์ด์ฉํ ๋ ์ง ๊ณ์ฐ segue๋ฅผ ์ด์ฉํ ํ๋ฉด ์ ํ ์ ์ฌ์ฌ์ฉ ๋ฉ์๋
gunw
ios
8y
03.facebook view
ํ์ด์ค๋ถ์ฒ๋ผ ํ ์ด๋ธ๋ทฐ๋ฅผ ์คํ ๋ฆฌ๋ณด๋์์ด ์์ฑํ๋ ํ๋ก์ ํธ ํน์ด์ ์ ๊ฐ ๊ฐ์ ๋ชจ๋ Key.swift์ ๊ฐ์ด ํ์ผ์ ์์ฑํ์ฌ ๋ค ๋ฐ๋ก ๋ง๋ค์ด์ฃผ๋์ . AppDelegate.swift์์ ๋ฃจํธ๋ทฐ์ปจํธ๋กค๋ฌ๋ฅผ ์ค์ ํด์ฃผ๋ ํ๋ฉด ์ ์ผ ์ค์ํ ์ ์์ฑ ๋ฉ์๋ ๋๋จธ์ง ๋ฐ์ดํฐ์์ค์ ๋๋ฆฌ๊ฒ์ดํธ๋ ์ผ๋ฐ์ ์ธ ํ ์ด๋ธ๋ทฐ ์์ฑ๊ณผ ๋น์ทํ๋ค.
gunw
ios
8y
02. StopWatch
ํน์ด์ ์ ๋ทฐ์ปจํธ๋กค๋ฌ์์, ๋ทฐ์์ ๋ ์ด๋ธ์ ๋์๊ณ , ์๋์ชฝ์ ํ ์ด๋ธ๋ทฐ๋ฅผ ๋ฃ์๋ค. StopWatch.swift ๋ฅผ ์์ฑํ์ฌ NSObject๋ฅผ ๋ฐ๋ ํด๋์ค๋ฅผ ์์ฑ ๋ฒํผ ๋ชจ์์ ๋๊ทธ๋ผ๋ฏธ๋ก ๋ฐ๊ฟ์ค๋ค.(viewDidLoad์ ์์ฑ, ๋ชจ์์ 1:1 aspect๋ก ๋ฐ๊พธ์ด์ผ ์์ด๋จ.) ์ดํ ๋๋ฆฌ๊ฒ์ดํธ ๋ฉ์๋๋ ๊ตฌํํ๋ค. changeButton ๋ฉ์๋๋ฅผ ๊ตฌํํ์ฌ ๋ฒํผ ๋์์
gunw
swift4
8y
Project.01 TabBar / TableView / ScrollView
ํญ๋ฐ ์ปจํธ๋กค์ ์ํด ๊ฐ๋จํ๊ฒ ๋ทฐ์ปจํธ๋กค๋ฌ 2๊ฐ์ ์๋ฒ ๋ฉ์ ์ํจ๋ค. ์ดํ Product.swift ํ์ผ์ ์์ฑํ์ฌ ์๋์ ๊ฐ์ด ์์ฑํ๋ค. ProductsTableViewController ํ ์ด๋ธ๋ทฐ์ปจํธ๋กค๋ฌ๋ฅผ ์์ฑํ ํ Product ๋ฐฐ์ด์ ํ๋กํผํฐ๋ก ์์ฑํ๋ค. ๋ฐฐ์ด์ ๊ฐ ์ ์ ๋ค์ด๊ฐ ๋ด์ฉ์ ์์ฑ ํ prepare๋ฉ์๋๋ฅผ ๋ถ๋ฌ์์ ์ธ๊ทธ๋ก ๋ค์ ํ๋ฉด์ผ๋ก ์ฐ๊ฒฐํ๋ค. ๊ฐ
Older โ