Markdown์ ํ ์คํธ ๊ธฐ๋ฐ์ ๋งํฌ์ ์ธ์ด๋ก 2004๋ ์กด๊ทธ๋ฃจ๋ฒ์ ์ํด ๋ง๋ค์ด์ก์ผ๋ฉฐ ์ฝ๊ฒ ์ฐ๊ณ ์ฝ์ ์ ์์ผ๋ฉฐ HTML๋ก ๋ณํ์ด ๊ฐ๋ฅํ๋ค. ํน์๊ธฐํธ์ ๋ฌธ์๋ฅผ ์ด์ฉํ ๋งค์ฐ ๊ฐ๋จํ ๊ตฌ์กฐ์ ๋ฌธ๋ฒ์ ์ฌ์ฉํ์ฌ ์น์์๋ ๋ณด๋ค ๋น ๋ฅด๊ฒ ์ปจํ ์ธ ๋ฅผ ์์ฑํ๊ณ ๋ณด๋ค ์ง๊ด์ ์ผ๋ก ์ธ์ํ ์ ์๋ค. ๋งํฌ๋ค์ด์ด ์ต๊ทผ ๊ฐ๊ด๋ฐ๊ธฐ ์์ํ ์ด์ ๋ ๊นํ(https://github.com) ๋๋ถ์ด๋ค. ๊นํ์ ์ ์ฅ์Repository์ ๊ดํ ์ ๋ณด๋ฅผ ๊ธฐ๋กํ๋ README.md๋ ๊นํ์ ์ฌ์ฉํ๋ ์ฌ๋์ด๋ผ๋ฉด ๋๊ตฌ๋ ๊ฐ์ฅ ๋จผ์ ์ ํ๊ฒ ๋๋ ๋งํฌ๋ค์ด ๋ฌธ์์๋ค. ๋งํฌ๋ค์ด์ ํตํด์ ์ค์น๋ฐฉ๋ฒ, ์์ค์ฝ๋ ์ค๋ช , ์ด์ ๋ฑ์ ๊ฐ๋จํ๊ฒ ๊ธฐ๋กํ๊ณ ๊ฐ๋ ์ฑ์ ๋์ผ ์ ์๋ค๋ ๊ฐ์ ์ด ๋ถ๊ฐ๋๋ฉด์ ์ ์ ์ฌ๋ฌ ๊ณณ์ผ๋ก ํผ์ ธ๊ฐ๊ฒ ๋๋ค.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shape { | |
| var numberOfSides: Int = 0 | |
| var name: String | |
| init(name: String) { | |
| self.name = name | |
| } | |
| } | |
| class Square: Shape { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shape { | |
| var numberOfSides: Int = 0 | |
| var name: String | |
| init(name: String) { | |
| self.name = name | |
| } | |
| } | |
| class Square: Shape { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Food { | |
| var name: String | |
| init(name: String) { | |
| self.name = name | |
| } | |
| convenience init() { | |
| self.init(name: "[์ด๋ฆ ์์]") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Animal { | |
| let species: String | |
| init?(species: String) { | |
| if species.isEmpty { return nil } | |
| self.species = species | |
| } | |
| } | |
| var animal = Animal(species: "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| struct InputView { | |
| private func printMenuInputGuidance () { | |
| print("์นด๋ ๊ฒ์ ์ข ๋ฅ๋ฅผ ์ ํํ์ธ์.") | |
| print("1. 7์นด๋") | |
| print("2. 5์นด๋") | |
| print("9. ์ข ๋ฃ") | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol Test { } | |
| extension Int: Test { } | |
| extension Array: Test where Element == Test { } | |
| let arr1 = Array<Test>() | |
| let arr2 = Array<Int>() | |
| arr1 is Test | |
| arr2 is Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol Test { } | |
| extension Int: Test { } | |
| extension Array: Test where Element: Test { } | |
| let arr1 = Array<Test>() | |
| let arr2 = Array<Int>() | |
| arr1 is Test | |
| arr2 is Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let fontSize = UIFont.boldSystemFont(ofSize: 60) | |
| attributedString.addAttribute(kCTFontAttributeName as NSAttributedString.Key, value: fontSize, range: NSRange(location: 0, length: 3)) | |
| let descriptionFontSize = UIFont.boldSystemFont(ofSize: 40) | |
| descriptionAttributedString.addAttribute(kCTFontAttributeName as NSAttributedString.Key, value: descriptionFontSize, range: NSRange(location: 0, length: 5)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| descriptionAttributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.white, range: NSRange(location: 0, length: 2)) | |
| descriptionAttributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.red, range: NSRange(location: 3, length: 2)) | |