Skip to content

Commit

Permalink
Merge pull request #25 from commitcomplete/FEAT/#22
Browse files Browse the repository at this point in the history
Feat/#22 메인화면 최상단 바 추가
  • Loading branch information
commitcomplete committed Jul 10, 2022
2 parents 3415d79 + a39668c commit fc1e9cc
Show file tree
Hide file tree
Showing 14 changed files with 208 additions and 2 deletions.
16 changes: 16 additions & 0 deletions NeflixCloneCoding/NeflixCloneCoding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
78268A9E287016BC0099F75C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78268A9D287016BC0099F75C /* Assets.xcassets */; };
78268AA1287016BC0099F75C /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78268AA0287016BC0099F75C /* Preview Assets.xcassets */; };
78268AA8287016D90099F75C /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78268AA7287016D90099F75C /* Storage.swift */; };
78AF389F2877033E00BA81D4 /* NetflixMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AF389E2877033E00BA81D4 /* NetflixMain.swift */; };
78AF38A328770BE700BA81D4 /* TopContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78AF38A228770BE700BA81D4 /* TopContent.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -21,6 +23,8 @@
78268A9D287016BC0099F75C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
78268AA0287016BC0099F75C /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
78268AA7287016D90099F75C /* Storage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = "<group>"; };
78AF389E2877033E00BA81D4 /* NetflixMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetflixMain.swift; sourceTree = "<group>"; };
78AF38A228770BE700BA81D4 /* TopContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopContent.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -53,6 +57,7 @@
78268A98287016BB0099F75C /* NeflixCloneCoding */ = {
isa = PBXGroup;
children = (
7862CCDB2875B0DA00FE3545 /* Main */,
78268A99287016BB0099F75C /* NeflixCloneCodingApp.swift */,
78268A9B287016BB0099F75C /* ContentView.swift */,
78268A9D287016BC0099F75C /* Assets.xcassets */,
Expand All @@ -70,6 +75,15 @@
path = "Preview Content";
sourceTree = "<group>";
};
7862CCDB2875B0DA00FE3545 /* Main */ = {
isa = PBXGroup;
children = (
78AF389E2877033E00BA81D4 /* NetflixMain.swift */,
78AF38A228770BE700BA81D4 /* TopContent.swift */,
);
path = Main;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -142,7 +156,9 @@
files = (
78268A9C287016BB0099F75C /* ContentView.swift in Sources */,
78268A9A287016BB0099F75C /* NeflixCloneCodingApp.swift in Sources */,
78AF38A328770BE700BA81D4 /* TopContent.swift in Sources */,
78268AA8287016D90099F75C /* Storage.swift in Sources */,
78AF389F2877033E00BA81D4 /* NetflixMain.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "스크린샷 2022-07-07 오후 9.53.45.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : [
{
"filename" : "스크린샷 2022-07-07 오후 9.52.51.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : [
{
"filename" : "netflix.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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" : [
{
"filename" : "pig.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions NeflixCloneCoding/NeflixCloneCoding/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import SwiftUI

struct ContentView: View {
var body: some View {
Text(Storage().apiKey)
.padding()
NetflixMain()
}
}

Expand Down
43 changes: 43 additions & 0 deletions NeflixCloneCoding/NeflixCloneCoding/Main/NetflixMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// NetflixMain.swift
// NeflixCloneCoding
//
// Created by dohankim on 2022/07/07.
//

import SwiftUI

struct NetflixMain: View {
@State var iscategoryClicked = false
var body: some View {
ZStack{
Color.black
ScrollView{
ZStack{
//main content 들어가야되는 부분
VStack{
Image("MainTitle")
.resizable()
.scaledToFill()
.frame(width: UIScreen.main.bounds.width , height: UIScreen.main.bounds.height * 0.5, alignment: .center)

}
//상단바를 위한 스택
VStack{
TopContent(iscategoryClicked: $iscategoryClicked)
Spacer()
}
}
}


}
.ignoresSafeArea()
}
}

struct NetflixMain_Previews: PreviewProvider {
static var previews: some View {
NetflixMain()
}
}
59 changes: 59 additions & 0 deletions NeflixCloneCoding/NeflixCloneCoding/Main/TopContent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// TopContent.swift
// NeflixCloneCoding
//
// Created by dohankim on 2022/07/07.
//

import SwiftUI

struct TopContent: View {
@Binding var iscategoryClicked : Bool
var body: some View {
VStack(spacing : 0){
HStack{
Image("netflix")
.resizable()
.frame(width: 40, height: 40, alignment: .center)
.padding()
Spacer()
Image(systemName: "airplayvideo")
.foregroundColor(Color.white)
.font(.title2)
Image("pig")
.resizable()
.frame(width: 30, height: 30, alignment: .center)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding()

}
.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height * 0.13, alignment: .bottom)
.background(.black.opacity(0.4))
HStack{
Spacer()
Text("시리즈")
.foregroundColor(.white)
.padding()
Spacer()
Text("영화")
.foregroundColor(.white)
.padding()
Spacer()
Button{
iscategoryClicked.toggle()
}label: {
Text("카테고리")
.foregroundColor(.white)
Image(systemName: "arrowtriangle.down.fill")
.foregroundColor(.white)
}
Spacer()
}
.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height * 0.06, alignment: .leading)
.background(.black.opacity(0.2))

}
}
}


Binary file added NeflixCloneCoding/NeflixCloneCoding/netflix.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fc1e9cc

Please sign in to comment.