Skip to content

Commit

Permalink
feat: 실제 Thumbnail을 가지고 있는 ThumbnailViewController 구현
Browse files Browse the repository at this point in the history
Issue: #38
  • Loading branch information
corykim0829 committed Apr 27, 2020
1 parent 91a134a commit c44b7dc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ios/SideDishApp/SideDishApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
1086E9822A6C8F6DE6E91752 /* Pods_SideDishApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F73413738BBF5BACBA69C851 /* Pods_SideDishApp.framework */; };
3812772124574FAC000BDF82 /* ThumbnailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3812772024574FAC000BDF82 /* ThumbnailViewController.swift */; };
381D92FA245174C30067C07A /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 381D92F9245174C30067C07A /* DetailViewController.swift */; };
385E343A2452016B00931F8B /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 385E34392452016B00931F8B /* NetworkManager.swift */; };
3868CC4D244F17F6008DEC81 /* PriceLabelsStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3868CC4C244F17F6008DEC81 /* PriceLabelsStackView.swift */; };
Expand Down Expand Up @@ -40,6 +41,7 @@
/* Begin PBXFileReference section */
0D9D542A05749160B83F5E28 /* Pods-SideDishApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SideDishApp.release.xcconfig"; path = "Target Support Files/Pods-SideDishApp/Pods-SideDishApp.release.xcconfig"; sourceTree = "<group>"; };
1358D50A20262260DC847020 /* Pods-SideDishApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SideDishApp.debug.xcconfig"; path = "Target Support Files/Pods-SideDishApp/Pods-SideDishApp.debug.xcconfig"; sourceTree = "<group>"; };
3812772024574FAC000BDF82 /* ThumbnailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThumbnailViewController.swift; sourceTree = "<group>"; };
381D92F9245174C30067C07A /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
385E34392452016B00931F8B /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
3868CC4C244F17F6008DEC81 /* PriceLabelsStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PriceLabelsStackView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -175,6 +177,7 @@
388C14AE244E936E003323F2 /* SideDishProductsViewController.swift */,
381D92F9245174C30067C07A /* DetailViewController.swift */,
38E2FCD42457456400817780 /* ThumbnailsPageViewController.swift */,
3812772024574FAC000BDF82 /* ThumbnailViewController.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -380,6 +383,7 @@
3868CC5D24501A17008DEC81 /* PaddingLabel.swift in Sources */,
38E0AF692452FBE600A26CB3 /* ProductList.swift in Sources */,
38E0AF652452FB5900A26CB3 /* Products.swift in Sources */,
3812772124574FAC000BDF82 /* ThumbnailViewController.swift in Sources */,
3868CC52244F1E10008DEC81 /* FinalPriceLabel.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// ThumbnailViewController.swift
// SideDishApp
//
// Created by Cory Kim on 2020/04/28.
// Copyright © 2020 corykim0829. All rights reserved.
//

import UIKit

class ThumbnailViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

view.backgroundColor = UIColor(displayP3Red: CGFloat.random(in: 0.0...1.0), green: CGFloat.random(in: 0.0...1.0), blue: CGFloat.random(in: 0.0...1.0), alpha: 1)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import UIKit

class ThumbnailsPageViewController: UIPageViewController {

private var thumbnailViewControllers = [UIViewController]()
private var thumbnailViewControllers = [ThumbnailViewController]()

private var imageURLs: [String]! {
didSet {
imageURLs.forEach { (_) in
let vc = UIViewController()
vc.view.backgroundColor = UIColor(displayP3Red: CGFloat.random(in: 0.0...1.0), green: CGFloat.random(in: 0.0...1.0), blue: CGFloat.random(in: 0.0...1.0), alpha: 1)
let vc = ThumbnailViewController()
thumbnailViewControllers.append(vc)
}
setViewControllers([thumbnailViewControllers.first!], direction: .forward, animated: false)
Expand Down

0 comments on commit c44b7dc

Please sign in to comment.