Skip to content

Commit

Permalink
Merge pull request #89 from DeveloperAcademy-POSTECH/release
Browse files Browse the repository at this point in the history
Version 1.0.2
  • Loading branch information
JIWON1923 committed Feb 5, 2023
2 parents 77dcadf + 45ba2f0 commit 3e09700
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 54 deletions.
16 changes: 14 additions & 2 deletions Record.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
87E96F4928DF93C4007D167E /* FirstPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E96F4828DF93C4007D167E /* FirstPage.swift */; };
87E96F4B28DF93CC007D167E /* SecondPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E96F4A28DF93CC007D167E /* SecondPage.swift */; };
87E96F4D28DF940A007D167E /* ThirdPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E96F4C28DF940A007D167E /* ThirdPage.swift */; };
87F1956D295FED74004A1CAF /* URLImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87F1956C295FED74004A1CAF /* URLImage.swift */; };
87FB281D285A04680036A5BB /* Screenshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87FB281C285A04680036A5BB /* Screenshot.swift */; };
A01413222855F4E60000EA59 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01413212855F4E60000EA59 /* HomeView.swift */; };
A0AA39BB285A4936009EE3EA /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0AA39BA285A4936009EE3EA /* OnboardingView.swift */; };
Expand Down Expand Up @@ -63,6 +64,7 @@
87E96F4828DF93C4007D167E /* FirstPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstPage.swift; sourceTree = "<group>"; };
87E96F4A28DF93CC007D167E /* SecondPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondPage.swift; sourceTree = "<group>"; };
87E96F4C28DF940A007D167E /* ThirdPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPage.swift; sourceTree = "<group>"; };
87F1956C295FED74004A1CAF /* URLImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLImage.swift; sourceTree = "<group>"; };
87FB281C285A04680036A5BB /* Screenshot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Screenshot.swift; sourceTree = "<group>"; };
A01413212855F4E60000EA59 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
A0AA39BA285A4936009EE3EA /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -183,6 +185,7 @@
87B6E3D728EC9BB8002D579A /* WriteViews */,
87B6E3D828EC9BFC002D579A /* DetailViews */,
87B6E3D928EC9C27002D579A /* CDListView */,
87F1956B295FED24004A1CAF /* Components */,
);
path = Views;
sourceTree = "<group>";
Expand All @@ -208,6 +211,14 @@
path = OnboardingViews;
sourceTree = "<group>";
};
87F1956B295FED24004A1CAF /* Components */ = {
isa = PBXGroup;
children = (
87F1956C295FED74004A1CAF /* URLImage.swift */,
);
path = Components;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -290,6 +301,7 @@
B29723B0285B192C0065FD36 /* SnapCarouselView.swift in Sources */,
87E96F4D28DF940A007D167E /* ThirdPage.swift in Sources */,
87FB281D285A04680036A5BB /* Screenshot.swift in Sources */,
87F1956D295FED74004A1CAF /* URLImage.swift in Sources */,
8715A79B2855479E001AB4F5 /* MusicAPI.swift in Sources */,
87B6E3CD28EC9764002D579A /* Color+Extensions.swift in Sources */,
87A0D9B4285BAF42006D0D3B /* Record.xcdatamodeld in Sources */,
Expand Down Expand Up @@ -453,7 +465,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.ios.larasy.record;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -492,7 +504,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.ios.larasy.record;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 1 addition & 1 deletion Record/Views/CDListView/SnapCarouselView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct SnapCarousel: View {
ForEach(items.indices, id: \.self) { content in
if content == UIState.activeCard {
NavigationLink(destination:
RecordDetailView(item: items[content]),
RecordDetailView(item: $items[content]),
isActive: $showDetailView) { // 상세 뷰로 이동
URLImage(urlString: items[content].albumArt!)
.clipShape(Circle())
Expand Down
36 changes: 36 additions & 0 deletions Record/Views/Components/URLImage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// URLImage.swift
// Record
//
// Created by 이지원 on 2022/12/31.
//

import SwiftUI

/// url string 을 이용해서 image를 불러옵니다.
/// - parameters
/// urlString: 이미지의 url 을 입력해주세요

struct URLImage: View {

let urlString: String

var body: some View {

AsyncImage(url: URL(string: urlString)) { image in
image
.resizable()
.aspectRatio(contentMode: .fill)
.background(.gray)

} placeholder: {
Color.titleLightgray
}
}
}

struct URLImage_Previews: PreviewProvider {
static var previews: some View {
URLImage(urlString: "https://cdn.pixabay.com/photo/2022/01/11/21/48/link-6931554_1280.png")
}
}
7 changes: 3 additions & 4 deletions Record/Views/DetailViews/RecordDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct RecordDetailView: View {
@Environment(\.managedObjectContext) var managedObjectContext
@Environment(\.presentationMode) var presentation: Binding<PresentationMode>

let item: Content
@Binding var item: Content

@State private var photo = false
@State private var story = false
Expand All @@ -31,7 +31,7 @@ struct RecordDetailView: View {
}
}
}

var body: some View {

ZStack {
Expand Down Expand Up @@ -175,9 +175,8 @@ struct RecordDetailView: View {
}
} message: { }
// 본문 ZStack End


}

func actionSheet() {
let shareImage = self.snapShot()
let activityItemMetadata = MyActivityItemSource(text: "\(item.title!) - \(item.artist!)" , image: shareImage)
Expand Down
15 changes: 8 additions & 7 deletions Record/Views/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ struct HomeView: View {

// MARK: link to CDListView

VStack {
VStack(spacing: 0) {
Text("내 음악 보러 가기")
.foregroundColor(.titleDarkgray)
.font(Font.customHeadline())
.padding(.top, UIScreen.getHeight(50))
.padding(.top, UIScreen.getHeight(90))
.padding(.bottom, UIScreen.getHeight(6))

NavigationLink(destination: CdListView()) {
Image("album")
.resizable()
.scaledToFill()
.frame(width: UIScreen.getWidth(130), height: UIScreen.getHeight(134))
.scaledToFit()
.frame(width: UIScreen.getWidth(130))
}
.navigationBarTitle("")

Expand Down Expand Up @@ -114,14 +115,14 @@ struct HomeView: View {
Text("음악 기록하기")
.foregroundColor(.titleDarkgray)
.font(Font.customHeadline())
.padding()
.padding(.bottom, UIScreen.getHeight(6))

VStack(spacing: 0) {
NavigationLink(destination: SearchView(isAccessFirst: true)) {
Image("note")
.resizable()
.scaledToFill()
.frame(width: UIScreen.getWidth(170), height: UIScreen.getHeight(156))
.scaledToFit()
.frame(width: UIScreen.getWidth(170))
}
}

Expand Down
39 changes: 0 additions & 39 deletions Record/Views/WriteViews/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,45 +178,6 @@ struct SearchView: View {
} //SearchView struct End



// MARK: - 앨범 커버 불러오기
struct URLImage: View {

@State var data: Data?
let urlString: String

var body: some View {

// 앨범 커버 불러오기
if let data = data, let uiimage = UIImage(data: data) { // 이미지 불러오기 성공

Image(uiImage: uiimage) // URL Image
.resizable()
.aspectRatio(contentMode: .fill)
.background(.gray)

} else { // 이미지 불러오기 실패

Rectangle() // 회색 박스
.foregroundColor(.titleLightgray)
.aspectRatio(contentMode: .fit)
.onAppear() {
fetchData()
}
}
}

private func fetchData() {
guard let url = URL(string: urlString) else { return }

let task = URLSession.shared.dataTask(with: url) { data, _, _ in
self.data = data
}
task.resume()
}
}


// MARK: - 현재 뷰 프리뷰
struct SearchView_Previews: PreviewProvider {
static var previews: some View {
Expand Down
2 changes: 1 addition & 1 deletion Record/Views/WriteViews/WriteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ struct WriteView: View {
Button("저장") {

item!.story = content
item!.image = inputImage!.pngData()
item!.image = inputImage!.jpegData(compressionQuality: 1)
item!.lyrics = lyrics

PersistenceController.shared.saveContent()
Expand Down

0 comments on commit 3e09700

Please sign in to comment.