ํฐ์คํ ๋ฆฌ ๋ทฐ

๐ฅ Texture ์ค์นํ๊ธฐ(Install Texture)
๐ ๊ฐ์
- Texture๋ฅผ ์ค์นํ๋ ๊ณผ์ ์ ์ดํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค! Texture๊ฐ ๋ฌด์์ธ์ง์ ๋ํ ์์ธํ ์ด์ผ๊ธฐ๋ ๋ค๋ฅธ ๊ธ์์ ์ถํ ์ค๋ช ํ๋๋ก ํ๊ฒ ์ต๋๋ค. 
 
 - ์ฐ์ ์ด๋ฒ ๊ธ์ ์ด๋ป๊ฒ ์ค์นํ๋์ง ๊ทธ ๊ณผ์ ์ ๋ฐ๋ผ๊ฐ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค :) 
 
๐ CocoaPods ์ค์นํ๊ธฐ
- Texture ๊ณต์ github์ ์ดํด๋ณด๋ฉด installation์์ ์ค์น๋ฅผ ์ํด ๋๊ฐ์ง ๋ฐฉ๋ฒ์ด ์์ต๋๋ค. 
 - CocoaPods
- Carthage
 
 - ์ ๋ CocoaPods๋ฅผ ์ด์ฉํด ์ค์น๋ฅผ ์งํํด๋ณด๊ฒ ์ต๋๋ค. ์ฐ์ CocoaPods์ ์ค์น๊ฐ ํ์ํฉ๋๋ค. 
 - $ sudo gem install cocoapods
 - ์ ์์ ์ผ๋ก ์ค์น๋์๋ ๋ถ๋ค๋ ์๊ฒ ์ง๋ง, ์ ์ ๊ฒฝ์ฐ(BigSur 11.4, M1 Mac) ์๋์ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ์ต๋๋ค. 
 - ERROR: While executing gem ... (Gem::FilePermissionError) 
 You don't have write permissions for the /usr/bin directory.
 - ๊ฒ์ํด๋ณด๋ Mac์ ์์คํ  Ruby๋ฅผ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ณ , ํด๊ฒฐ๋ฒ์ ์์ธํ ์ค๋ช ์ ์๋ ๋ธ๋ก๊ทธ์ ๋์์์ต๋๋ค. 
 - ๊ฐ๋ตํ๊ฒ ์ ๋ฆฌํ๋ฉด ํ์ํ ๋ช ๋ น์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. 
 - $ brew update $ brew install rbenv ruby-build $ rbenv install -l // Ruby ๋ฒ์ ์ด ๋์ค๊ณ ์ด ๊ธ์ ๊ฒฝ์ฐ 2.7.4 ๋ฒ์ ์ผ๋ก ์งํ $ rbenv global 2.7.4 $ rbenv versions // *๋ฅผ ํตํด ํ์ฌ ๋ฒ์  ์ฒดํฌ ๊ฐ๋ฅ $ echo '# rbenv' >> ~/.bash_profile $ echo 'export PATH=~/.rbenv/bin:$PATH' >> ~/.bash_profile $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile $ source ~/.bash_profile $ gem install bundler
 - ์์ ์์ ์ ๊ฑฐ์น ํ ๋ค์ CocoaPods๋ฅผ ์ค์นํ๋ฉด ์ ์ ์ค์น๊ฐ ๋ฉ๋๋ค. 
 - $ sudo gem install cocoapods
 
๐ง๐ปโ๐ป Texture ์ค์นํ๊ธฐ
- ์ด์  CocoaPods๋ฅผ ์ค์นํ๊ณ ์ถ์ ํ๋ก์ ํธ์ ๋๋ ํ ๋ฆฌ๋ก ์ด๋ํ์ฌ ์์ ์ ์งํํฉ๋๋ค. 
 - $ pod init
 - ๐ง ํ๋ก์ ํธ๊ฐ ์๋ ์์น์์ pod init์ ํ๋ฉด ์๋์ ๊ฐ์ ๋ฉ์ธ์ง๊ฐ ๋น๋๋ค. 
 - [!] No Xcode project found, please specify one 
 - ํ๋ก์ ํธ๊ฐ ์กด์ฌํ๋ ์์น์์ ์ ์์ ์ผ๋ก pod init์ ํ ๊ฒฝ์ฐ ํด๋น ์์น์ ์๋ ํ์ผ์ด ์์ฑ๋ฉ๋๋ค. 
 - PodFile 
 - ์ด์  ์์ PodFile์์ Texture๋ฅผ ์ถ๊ฐํด์ฃผ๋ ์์ ์ ํฉ๋๋ค. ์ฐ์ ์์ PodFile์ ์ด๊ธฐ ์ํด ์ ๋ nano๋ฅผ ์ฌ์ฉํ์ต๋๋ค. 
 - $ nano Podfile
 - ๊ทธ๋ผ ์๋์ ๊ฐ์ ๋ฌธ์๊ฐ ์ด๋ฆฌ๊ฒ ๋ฉ๋๋ค. 
 - # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'ํ๋ก์ ํธ ๋ช ' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! pod 'Texture' # ์ฌ๊ธฐ์ ์ถ๊ฐ!! # Pods for ํ๋ก์ ํธ ๋ช
 - ์์ ์์ฑํ ๊ฒ์ฒ๋ผ target do ์๋์ 
 - pod 'Texture' 
 - ๋ฅผ ์ถ๊ฐํฉ๋๋ค. - ์์ฑ์ด ๋๋ฌ์ผ๋ฉด ์ ์ฅํ๊ณ ์ข ๋ฃ๋ฅผ ํด์ผํฉ๋๋ค. ์ ๋ (^ + x)๋ก ์ข ๋ฃํ์ต๋๋ค :) 
 - ์ด์  ๋ง๋ฌด๋ฆฌ ์์ ๋ง ํ์ํฉ๋๋ค. ์๋์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํด์ค๋๋ค. 
 - $ pod install $ pod update Texture
 - ์ด์  Texture์ ์ค์น๋ ๋ฌด์ฌํ ์๋ฃ๋์์ต๋๋ค. ์ด์  Texture๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด ํ๋ก์ ํธ์์ ๊ธฐ๋ณธ์ ์ธ ์์ ์ ํด์ฃผ๋ฉด ๋ฉ๋๋ค! 
 
โ๏ธ Texture ์ฌ์ฉ์ ์ํ ๊ธฐ๋ณธ ์์
- ์ด์  ๋ค์ Xcode๋ฅผ ์ผ๊ณ ํ๋ก์ ํธ์ ๋ค์ด๊ฐ๋๋ค. ํ๋ก์ ํธ์์ ์ฐ์ ์๋์ผ๋ก ์์ฑ๋ storyboard ํ์ผ์ ์ ๊ฑฐํด์ค๋๋ค. ์ ๋ Main.storyboard์ LaunchScreen.storyboard๋ฅผ ์ ๊ฑฐํด์ฃผ์์ต๋๋ค. 
 - ๊ทธ๋ฆฌ๊ณ Info.plist์ ๋ค์ด๊ฐ์ Main์ผ๋ก ๊ฒ์ํด์ค๋๋ค. 
  
 - ์์ ๋ฐ์ค ์ณ์ง Storyboard Name๊ณผ Main storyboard file base name์ ์ ๊ฑฐํด์ค๋๋ค. 
 - ์คํ ๋ฆฌ๋ณด๋๊ฐ ์์ ๋์๋ ์ฑ์ด ์คํ๋๋ฉด ์ฒ์์ผ๋ก ๋ณด์ฌ์ค ViewController๊ฐ ์ง์ ์ด ๋์๋๋ฐ, ์ง๊ธ์ ์ญ์ ๋์๊ธฐ ๋๋ฌธ์ SceneDelegate์์ ์ค์ ์ ํด์ค์ผํฉ๋๋ค. 
 - class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). guard let windowScence = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: windowScence) window?.windowScene = windowScence let rootViewController = HomeViewController() window?.rootViewController = rootViewController window?.makeKeyAndVisible() } ....
 - ์์ ๊ฐ์ด rootViewController ์ธ์คํด์ค๋ฅผ ์์ฑํด์ค๋๋ค. 
 - ๐ง ์์ ์์ ์ ๋ฌธ์ ์์ด ์๋ฃํ๋๋ฐ import๊ฐ ๋์ง ์๋ค์? - ์ฐ์ Texture๋ฅผ ์ฌ์ฉํ๊ธฐ์ํด ์๋์ ๊ฐ์ด import ํด์ผํฉ๋๋ค. 
 - import AsyncDisplayKit
 - ๊ทธ๋ฐ๋ฐ ์๋์์ฑ์ด ์๋ฉ๋๋ค! ๊ทธ ์ด์ ๋ ๊ณต์ ๋ฌธ์์ ์ค์น ๋ฉ๋ด์ผ ๋ง์ง๋ง์ ์์ต๋๋ค. 
 - Donโt forget to use the workspace - .xcworkspacefile, not the project- .xcodeprojfile.
 - ์ฆ, ํ๋ก์ ํธ.xcodeproj ํ์ผ์ ํตํด ํ๋ก์ ํธ๋ฅผ ์ด๋ฉด import๊ฐ ๋์ง ์์ต๋๋ค. ๋ค์ ํ๋ก์ ํธ.xcworkspace ํ์ผ์ ํตํด ํ๋ก์ ํธ๋ฅผ ์ด๋ฉด ์ ์์ ์ผ๋ก import ๋๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค. 
 
 - ์ด์  ๋ณธ๊ฒฉ์ ์ผ๋ก Texture์ ๋ํด ํ์ตํ๊ณ , ๊ธ์ ๋จ๊ฒจ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค! ๐ฅ 
'iOS ์ฑ๊ฐ๋ฐ > iOS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [iOS] - RxSwift ๊ฐ๋  ์ดํดํ๊ธฐ_02 (0) | 2021.10.17 | 
|---|---|
| [iOS] - RxSwift ๊ฐ๋  ์ดํดํ๊ธฐ_01 (0) | 2021.10.17 | 
| [iOS] - View Controller (0) | 2021.06.08 | 
| [iOS] - ์ ๋ ํ ์คํธ(Unit Tests) (0) | 2021.05.12 | 
| [iOS] - UIBarButton Style(Bar ๋ฒํผ ์คํ์ผ) (0) | 2021.05.04 | 
- Total
- Today
- Yesterday
- PassingCars#Codility#Python
- Brackets#Stacks and Queues#Codility#Python
- ๋ ์ง ๊ณ์ฐ#BOJ#์์ ํ์#Python
- django#slicing
- ๋๋ฌด์๋ฅด๊ธฐ#BOJ#์ด๋ถํ์#Python
- ๋์ ์๋ฅด๊ธฐ#์ด๋ถํ์#BOJ#Python
- ์ฌ์๊ฐ์#๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ#Python
- ๋ฐ๋ณต์์ด#๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ#Python
- django
- ๋ฐฐ์ดํฉ์น๊ธฐ#๋ถํ ์ ๋ณต#BOJ#Python
- ์ฟผ๋ํธ๋ฆฌ#BOJ#๋ถํ ์ ๋ณต#Python
- Swift#Tuples#Range
- Triangle#Sorting#Codility#Python
- Distinct#Codility#Python
- ํ ๋งํ #๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ#Python
- ์ข ์ด์๋ฅด๊ธฐ#๋ถํ ์ ๋ณต#BOJ#Python
- API#lazy#
- N์ผ๋ก ํํ#DP#Programmers#Python
- ๋ฏธ๋ก ํ์#๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ#Python
- ๋ฐฑ์ค ์๊ณ ๋ฆฌ์ฆ#BackTracking
- ํ์ด์ฌ์๊ณ ๋ฆฌ์ฆ์ธํฐ๋ทฐ#4์ฅ
- ๋ณ๋ ๋์ดํธ#BOJ#ํ์๋ฒ#Python
- ํ  ํ๋ก์ ํธ#๋ฐฑ์ค์๊ณ ๋ฆฌ์ฆ#Python
- ์ํธ์ฝ๋#dp#BOJ#Python
- NumberofDiscIntersections#Codility#Sort#Python
- ๊ณต์ ๊ธฐ ์ค์น#BOJ#์ด๋ถํ์#Python
- ์์ด์ฌ์ดํด#BOJ#Python
- filter#isalnum#lower
- ๋ฆฌ๋ชจ์ปจ#์์ ํ์#BOJ#Python
- ํฐํ๋น์น#๋ฆฌ์ฝ#xbox#controller
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 |