Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 115 additions & 7 deletions PolyHack/PolyHack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@
5141B6302A3B41CA00105625 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5141B62F2A3B41CA00105625 /* Color.swift */; };
5141B6322A3B7D7300105625 /* SplashVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5141B6312A3B7D7300105625 /* SplashVC.swift */; };
5141B6342A3B83C900105625 /* Home.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5141B6332A3B83C900105625 /* Home.storyboard */; };
5141B6382A3B8DF900105625 /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5141B6372A3B8DF900105625 /* HomeVC.swift */; };
5141B63B2A3B956B00105625 /* MyPage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5141B63A2A3B956B00105625 /* MyPage.storyboard */; };
5141B63D2A3B957D00105625 /* MyPageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5141B63C2A3B957D00105625 /* MyPageVC.swift */; };
518CD57D2A3D9FE300C86A4D /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD57C2A3D9FE300C86A4D /* HomeVC.swift */; };
518CD5842A3DA8A300C86A4D /* TabBar.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 518CD5832A3DA8A300C86A4D /* TabBar.storyboard */; };
518CD5862A3DA8BD00C86A4D /* TabBarVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5852A3DA8BD00C86A4D /* TabBarVC.swift */; };
518CD5AA2A3DB17A00C86A4D /* StaticVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5A92A3DB17A00C86A4D /* StaticVC.swift */; };
518CD5AC2A3DB18E00C86A4D /* Static.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 518CD5AB2A3DB18E00C86A4D /* Static.storyboard */; };
518CD5B12A3DCF2000C86A4D /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5B02A3DCF2000C86A4D /* HomeTableViewCell.swift */; };
518CD5B32A3DD04F00C86A4D /* EntireNewsAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5B22A3DD04F00C86A4D /* EntireNewsAPI.swift */; };
518CD5B52A3DD1F100C86A4D /* HomeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5B42A3DD1F100C86A4D /* HomeAPI.swift */; };
518CD5B72A3DD20600C86A4D /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5B62A3DD20600C86A4D /* API.swift */; };
518CD5B92A3DD77C00C86A4D /* TopNewsAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518CD5B82A3DD77C00C86A4D /* TopNewsAPI.swift */; };
51A794F02A3E07C30029B39D /* NewsDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A794EF2A3E07C30029B39D /* NewsDetailVC.swift */; };
51A794F22A3E0B390029B39D /* NewsDetailAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A794F12A3E0B390029B39D /* NewsDetailAPI.swift */; };
51E674C92A358DB600D30EE1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E674C82A358DB600D30EE1 /* AppDelegate.swift */; };
51E674CB2A358DB600D30EE1 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E674CA2A358DB600D30EE1 /* SceneDelegate.swift */; };
51E674CD2A358DB600D30EE1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E674CC2A358DB600D30EE1 /* ViewController.swift */; };
Expand All @@ -27,9 +38,20 @@
5141B62F2A3B41CA00105625 /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = "<group>"; };
5141B6312A3B7D7300105625 /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = "<group>"; };
5141B6332A3B83C900105625 /* Home.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Home.storyboard; sourceTree = "<group>"; };
5141B6372A3B8DF900105625 /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = "<group>"; };
5141B63A2A3B956B00105625 /* MyPage.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MyPage.storyboard; sourceTree = "<group>"; };
5141B63C2A3B957D00105625 /* MyPageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageVC.swift; sourceTree = "<group>"; };
518CD57C2A3D9FE300C86A4D /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = "<group>"; };
518CD5832A3DA8A300C86A4D /* TabBar.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TabBar.storyboard; sourceTree = "<group>"; };
518CD5852A3DA8BD00C86A4D /* TabBarVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarVC.swift; sourceTree = "<group>"; };
518CD5A92A3DB17A00C86A4D /* StaticVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticVC.swift; sourceTree = "<group>"; };
518CD5AB2A3DB18E00C86A4D /* Static.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Static.storyboard; sourceTree = "<group>"; };
518CD5B02A3DCF2000C86A4D /* HomeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTableViewCell.swift; sourceTree = "<group>"; };
518CD5B22A3DD04F00C86A4D /* EntireNewsAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntireNewsAPI.swift; sourceTree = "<group>"; };
518CD5B42A3DD1F100C86A4D /* HomeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeAPI.swift; sourceTree = "<group>"; };
518CD5B62A3DD20600C86A4D /* API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; };
518CD5B82A3DD77C00C86A4D /* TopNewsAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopNewsAPI.swift; sourceTree = "<group>"; };
51A794EF2A3E07C30029B39D /* NewsDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsDetailVC.swift; sourceTree = "<group>"; };
51A794F12A3E0B390029B39D /* NewsDetailAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsDetailAPI.swift; sourceTree = "<group>"; };
51E674C52A358DB600D30EE1 /* PolyHack.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PolyHack.app; sourceTree = BUILT_PRODUCTS_DIR; };
51E674C82A358DB600D30EE1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
51E674CA2A358DB600D30EE1 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -55,14 +77,17 @@
isa = PBXGroup;
children = (
5141B62F2A3B41CA00105625 /* Color.swift */,
518CD5B62A3DD20600C86A4D /* API.swift */,
);
path = Const;
sourceTree = "<group>";
};
5141B6352A3B8DD900105625 /* Home */ = {
isa = PBXGroup;
children = (
5141B6372A3B8DF900105625 /* HomeVC.swift */,
518CD57C2A3D9FE300C86A4D /* HomeVC.swift */,
518CD5B42A3DD1F100C86A4D /* HomeAPI.swift */,
51A794EF2A3E07C30029B39D /* NewsDetailVC.swift */,
);
path = Home;
sourceTree = "<group>";
Expand All @@ -87,13 +112,18 @@
5156508A2A39E8CF00840026 /* API */ = {
isa = PBXGroup;
children = (
518CD5B22A3DD04F00C86A4D /* EntireNewsAPI.swift */,
518CD5B82A3DD77C00C86A4D /* TopNewsAPI.swift */,
51A794F12A3E0B390029B39D /* NewsDetailAPI.swift */,
);
path = API;
sourceTree = "<group>";
};
5156508B2A39E8DD00840026 /* Controller */ = {
isa = PBXGroup;
children = (
518CD5A72A3DB14F00C86A4D /* Statics */,
518CD5822A3DA89800C86A4D /* Const */,
5141B6392A3B955400105625 /* MyPage */,
5141B6362A3B8DE000105625 /* Login */,
5141B6352A3B8DD900105625 /* Home */,
Expand All @@ -104,20 +134,87 @@
5156508C2A39E8EC00840026 /* Views */ = {
isa = PBXGroup;
children = (
51E674CE2A358DB600D30EE1 /* Main.storyboard */,
5141B6332A3B83C900105625 /* Home.storyboard */,
5141B63A2A3B956B00105625 /* MyPage.storyboard */,
518CD5A82A3DB15600C86A4D /* Statics */,
518CD5812A3DA89200C86A4D /* Const */,
518CD5802A3DA87E00C86A4D /* MyPage */,
518CD57F2A3DA87900C86A4D /* Home */,
518CD57E2A3DA87200C86A4D /* Login */,
);
path = Views;
sourceTree = "<group>";
};
5156508D2A39E90A00840026 /* Models */ = {
isa = PBXGroup;
children = (
518CD5AD2A3DCEFA00C86A4D /* Home */,
);
path = Models;
sourceTree = "<group>";
};
518CD57E2A3DA87200C86A4D /* Login */ = {
isa = PBXGroup;
children = (
51E674CE2A358DB600D30EE1 /* Main.storyboard */,
);
path = Login;
sourceTree = "<group>";
};
518CD57F2A3DA87900C86A4D /* Home */ = {
isa = PBXGroup;
children = (
5141B6332A3B83C900105625 /* Home.storyboard */,
);
path = Home;
sourceTree = "<group>";
};
518CD5802A3DA87E00C86A4D /* MyPage */ = {
isa = PBXGroup;
children = (
5141B63A2A3B956B00105625 /* MyPage.storyboard */,
);
path = MyPage;
sourceTree = "<group>";
};
518CD5812A3DA89200C86A4D /* Const */ = {
isa = PBXGroup;
children = (
518CD5832A3DA8A300C86A4D /* TabBar.storyboard */,
);
path = Const;
sourceTree = "<group>";
};
518CD5822A3DA89800C86A4D /* Const */ = {
isa = PBXGroup;
children = (
518CD5852A3DA8BD00C86A4D /* TabBarVC.swift */,
);
path = Const;
sourceTree = "<group>";
};
518CD5A72A3DB14F00C86A4D /* Statics */ = {
isa = PBXGroup;
children = (
518CD5A92A3DB17A00C86A4D /* StaticVC.swift */,
);
path = Statics;
sourceTree = "<group>";
};
518CD5A82A3DB15600C86A4D /* Statics */ = {
isa = PBXGroup;
children = (
518CD5AB2A3DB18E00C86A4D /* Static.storyboard */,
);
path = Statics;
sourceTree = "<group>";
};
518CD5AD2A3DCEFA00C86A4D /* Home */ = {
isa = PBXGroup;
children = (
518CD5B02A3DCF2000C86A4D /* HomeTableViewCell.swift */,
);
path = Home;
sourceTree = "<group>";
};
51E674BC2A358DB600D30EE1 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -212,8 +309,10 @@
files = (
51E674D52A358DB700D30EE1 /* LaunchScreen.storyboard in Resources */,
5141B63B2A3B956B00105625 /* MyPage.storyboard in Resources */,
518CD5AC2A3DB18E00C86A4D /* Static.storyboard in Resources */,
51E674D22A358DB700D30EE1 /* Assets.xcassets in Resources */,
51E674D02A358DB600D30EE1 /* Main.storyboard in Resources */,
518CD5842A3DA8A300C86A4D /* TabBar.storyboard in Resources */,
5141B6342A3B83C900105625 /* Home.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -225,14 +324,23 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
518CD5AA2A3DB17A00C86A4D /* StaticVC.swift in Sources */,
51E674CD2A358DB600D30EE1 /* ViewController.swift in Sources */,
5141B6382A3B8DF900105625 /* HomeVC.swift in Sources */,
518CD57D2A3D9FE300C86A4D /* HomeVC.swift in Sources */,
51E674C92A358DB600D30EE1 /* AppDelegate.swift in Sources */,
51A794F22A3E0B390029B39D /* NewsDetailAPI.swift in Sources */,
5141B62D2A3B3AB500105625 /* LoginVC.swift in Sources */,
518CD5B12A3DCF2000C86A4D /* HomeTableViewCell.swift in Sources */,
51A794F02A3E07C30029B39D /* NewsDetailVC.swift in Sources */,
518CD5B72A3DD20600C86A4D /* API.swift in Sources */,
518CD5862A3DA8BD00C86A4D /* TabBarVC.swift in Sources */,
5141B6302A3B41CA00105625 /* Color.swift in Sources */,
518CD5B92A3DD77C00C86A4D /* TopNewsAPI.swift in Sources */,
5141B63D2A3B957D00105625 /* MyPageVC.swift in Sources */,
518CD5B52A3DD1F100C86A4D /* HomeAPI.swift in Sources */,
51E674CB2A358DB600D30EE1 /* SceneDelegate.swift in Sources */,
5141B6322A3B7D7300105625 /* SplashVC.swift in Sources */,
518CD5B32A3DD04F00C86A4D /* EntireNewsAPI.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "B6DA0ADB-642C-4E7B-A0E3-8C42B2A0AF62"
type = "1"
version = "2.0">
</Bucket>
31 changes: 31 additions & 0 deletions PolyHack/PolyHack/API/EntireNewsAPI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Foundation

// MARK: - NewsAPI
struct EntireNewsAPI: Codable {
let code: Int?
let message: String?
let data: [EntireNewsDatum]?
}

struct EntireNewsDatum: Codable {
let news_id: Int?
let title: String?
let source: EntireSource?
let published_at: String?
let author: String?
let image_url: String?

enum EntireCodingKeys: String, CodingKey {
case news_id
case title, source
case published_at
case author
case image_url
}
}

enum EntireSource: String, Codable {
case cnn = "CNN"
case time = "Time"
}

25 changes: 25 additions & 0 deletions PolyHack/PolyHack/API/NewsDetailAPI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Foundation

// MARK: - NewsDetailAPI
struct NewsDetailAPI: Codable {
let code: Int?
let message: String?
let data: NewsDetailDataClass?
}

// MARK: - DataClass
struct NewsDetailDataClass: Codable {
let news_id: Int?
let title, content, source, published_at: String?
let author: String?
let image_url: String?

enum CodingKeys: String, CodingKey {
case news_id
case title, content, source
case published_at
case author
case image_url
}
}

24 changes: 24 additions & 0 deletions PolyHack/PolyHack/API/TopNewsAPI.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Foundation

// MARK: - TopNewsAPI
struct TopNewsAPI: Codable {
let code: Int?
let message: String?
let data: DataClass?
}

// MARK: - DataClass
struct DataClass: Codable {
let newsID: Int?
let title, source, publishedAt, author: String?
let imageURL: String?

enum CodingKeys: String, CodingKey {
case newsID = "news_id"
case title, source
case publishedAt = "published_at"
case author
case imageURL = "image_url"
}
}

2 changes: 0 additions & 2 deletions PolyHack/PolyHack/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
],
"color" : {
"color-space" : "srgb",
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "255",
"green" : "255",
"red" : "255"
"blue" : "0xAB",
"green" : "0x58",
"red" : "0x25"
}
},
"idiom" : "universal"
Expand Down
6 changes: 6 additions & 0 deletions PolyHack/PolyHack/Assets.xcassets/Navigation/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Home.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Home_Grey.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "MyPage.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading