Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat [#186] 3차 스프린트 기능 구현 완료 및 QA 진행 완료 #187

Merged
merged 43 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1baed33
[Feat] #186 - 투명도 터치 영역 범위 확대 및 적용
boogios May 9, 2024
9fbb1a9
[Feat] #186 - 커스텀뷰 변경으로 인해 폰트 변경
boogios May 9, 2024
91e07ca
[Feat] #186 - 투명도 버튼 이미지 변경
boogios May 9, 2024
84f023d
[Feat] #186 - 투명도 버튼 UI 수정
boogios May 9, 2024
874d541
[Feat] #186 - 투명도 매커니즘 수정 함수 구현
boogios May 10, 2024
530747e
[Feat] #186 - 투명도 매커니즘 수정 적용
boogios May 10, 2024
fb733f6
[Feat] #186 - 사진 업로드 버튼 이미지 추가
boogios May 10, 2024
cecc618
[Feat] #186 - 사진 업로드 UI 구현
boogios May 10, 2024
54eab24
[Feat] #186 - 게시물 작성하기 DTO 추가 및 API 기능 구현 완료
boogios May 10, 2024
880a0c3
[Feat] #186 - 게시물 사진 URL로 load하는 함수 추가
boogios May 10, 2024
b283489
[Feat] #186 - 게시물 리스트 조회 DTO 이미지 URL 값 추가
boogios May 10, 2024
bbfb580
[Feat] #186 - 게시물 리스트 조회 API 연결 및 UI 구현 완료
boogios May 10, 2024
56e8d28
[Fix] #186 - 게시물 업로드 시, 링크 없는 경우 줄바꿈 추가되는 오류 수정
boogios May 10, 2024
2e850ed
[Feat] #186 - 서버에 사진 전송하는 시간 고려하여 1초 후에 refresh 되도록 구현
boogios May 10, 2024
2bce46b
[Feat] #186 - 글쓰기 뷰 사진 삭제 버튼 UI 추가
boogios May 14, 2024
4ad77fd
[Feat] #186 - 사진 상세보기 커스텀 뷰 파일 추가
boogios May 14, 2024
5530cdb
[Feat] #186 - 사진 상세보기 커스텀 뷰 UI 구현 완료
boogios May 14, 2024
b45c35f
[Feat] #186 - 게시글, 댓글 글자 수 제한 UI 수정 완료
boogios May 14, 2024
453186b
[Feat] #186 - 게시글 상세보기 뷰, 댓글 뷰에 사진 업로드 UI 구현 완료
boogios May 14, 2024
cc5778f
[Feat] #186 - 게시글 상세보기, 댓글 DTO에 사진 URL 값 추가
boogios May 14, 2024
7f7cfb7
[Feat] #186 - 게시글에 해당하는 답글 리스트 조회 ver2 API 구현 완료
boogios May 14, 2024
7c32656
[Feat] #186 - 답글 작성 ver2 API 구현 완료
boogios May 14, 2024
875ed97
[Feat] #186 - 게시글, 답글 작성 UI 필요없는 코드 삭제
boogios May 15, 2024
ec9118e
[Feat] #186 - 게시글, 답글 작성 시 이미지 지워도 업로드되는 오류 수정
boogios May 15, 2024
84369c9
[Feat] #186 - 게시글, 답글 작성 UI 깨지는 오류 수정
boogios May 15, 2024
eeee875
[Feat] #186 - 마이페이지 DTO에 사진 URL 값 추가, API 수정 완료
boogios May 15, 2024
c61d2a5
[Feat] #186 - 마이페이지 사진 UI 구현 완료
boogios May 15, 2024
68f4656
[Feat] #186 - 3차 QA_링크 삽입칸 글자 없이도 게시 버튼 활성화되도록 수정
boogios May 16, 2024
0f3b108
[Feat] #186 - 3차 QA_게시글, 답글 작성 플레이스 홀더 수정
boogios May 16, 2024
3a3b9aa
[Feat] #186 - 3차 QA_사진 있는 글에 답글 작성할 때, 스크롤 위치 조정
boogios May 16, 2024
fde547d
[Feat] #186 - Kingfisher 이미지 라이브러리 설치
boogios May 16, 2024
8cccd09
[Feat] #186 - 3차 QA_Kingfisher 라이브러리로 사진 업로드 속도 향상 완료
boogios May 16, 2024
361b5ff
[Feat] #186 - 3차 QA_Kingfisher 라이브러리로 사진 업로드 속도 향상 완료
boogios May 16, 2024
cd539b0
Merge remote-tracking branch 'refs/remotes/origin/feat/#186-sprint2-2'
boogios May 20, 2024
0fa8684
[Feat] #186 - 3차 QA_깃 문제 해결
boogios May 20, 2024
9ae2ace
[Feat] #186 - 3차 QA_iOS 15 버전 이하 DownSampling 안되는 현상 문제 해결
boogios May 20, 2024
7ad2317
[Feat] #186 - 3차 QA_collectionview 중복 호출 코드 제거
boogios May 20, 2024
4a28907
[Feat] #186 - 3차 QA_댓글달 때, 스크롤 위치가 다른 오류 해결 완료
boogios May 22, 2024
012fc73
[Feat] #186 - 3차 QA_투명도 매커니즘 수정 완료
boogios May 28, 2024
46b8370
[Fix] #186 - 3차 QA_자동 업데이트 오류 수정
boogios May 31, 2024
5b7925f
[Feat] #186 - 3차 QA_1.2.1v 업데이트 내용 수정
boogios May 31, 2024
eb7543f
[Fix] #186 - 3차 QA_자동 업데이트 코드 단순화 및 2번 호출되는 코드 삭제
boogios May 31, 2024
7269dfd
[Release] #186 - Release version 1.2.1
boogios May 31, 2024
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
33 changes: 29 additions & 4 deletions DontBe-iOS/DontBe-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
3C1ABD872B8F01E700ADF97B /* MyPageSignOutReasonViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C1ABD862B8F01E700ADF97B /* MyPageSignOutReasonViewModel.swift */; };
3C1ABD892B8F083C00ADF97B /* MyPageSignOutConfirmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C1ABD882B8F083C00ADF97B /* MyPageSignOutConfirmViewController.swift */; };
3C1ABD8B2B8F089100ADF97B /* MyPageSignOutConfirmView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C1ABD8A2B8F089100ADF97B /* MyPageSignOutConfirmView.swift */; };
3C2245292BF34C1A0095D3FB /* DontBePhotoDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2245282BF34C1A0095D3FB /* DontBePhotoDetailView.swift */; };
3C2854FD2B3A9FD800369C99 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2854FC2B3A9FD800369C99 /* ExampleViewController.swift */; };
3C2854FF2B3AA01700369C99 /* ExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2854FE2B3AA01700369C99 /* ExampleView.swift */; };
3C2855012B3AA0A000369C99 /* ExampleCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C2855002B3AA0A000369C99 /* ExampleCollectionViewCell.swift */; };
Expand All @@ -124,6 +125,7 @@
3C4EDCCB2B58653800A9707C /* PostReplyResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4EDCCA2B58653800A9707C /* PostReplyResponseDTO.swift */; };
3C4F5BB52B7A49A500B21C45 /* MyPageSignOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4F5BB42B7A49A500B21C45 /* MyPageSignOutViewController.swift */; };
3C4F5BB72B7A4A0C00B21C45 /* MyPageSignOutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4F5BB62B7A4A0C00B21C45 /* MyPageSignOutView.swift */; };
3C5F82B02BFB133700D2FE3F /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 3C5F82AF2BFB133700D2FE3F /* Kingfisher */; };
3C6192ED2B3A719A00220CEB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6192EC2B3A719A00220CEB /* AppDelegate.swift */; };
3C6192EF2B3A719A00220CEB /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6192EE2B3A719A00220CEB /* SceneDelegate.swift */; };
3C6192F62B3A719C00220CEB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3C6192F52B3A719C00220CEB /* Assets.xcassets */; };
Expand All @@ -147,6 +149,7 @@
3CBF99292B56BD210015FE4B /* MypageProfileResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBF99282B56BD210015FE4B /* MypageProfileResponseDTO.swift */; };
3CD25D272B5466DB0075F80F /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD25D262B5466DB0075F80F /* Empty.swift */; };
3CD25D292B5482FE0075F80F /* DontBeBottomSheetButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD25D282B5482FE0075F80F /* DontBeBottomSheetButton.swift */; };
3CE6B90D2BECBCA6002E2CDC /* Functions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE6B90C2BECBCA6002E2CDC /* Functions.swift */; };
3CE9C12A2B4BE6780086E4A3 /* WriteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE9C1292B4BE6780086E4A3 /* WriteViewController.swift */; };
3CE9C12C2B4BE7300086E4A3 /* WriteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE9C12B2B4BE7300086E4A3 /* WriteView.swift */; };
3CE9C12E2B4C08AE0086E4A3 /* WriteTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE9C12D2B4C08AE0086E4A3 /* WriteTextView.swift */; };
Expand Down Expand Up @@ -267,6 +270,7 @@
3C1ABD862B8F01E700ADF97B /* MyPageSignOutReasonViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageSignOutReasonViewModel.swift; sourceTree = "<group>"; };
3C1ABD882B8F083C00ADF97B /* MyPageSignOutConfirmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageSignOutConfirmViewController.swift; sourceTree = "<group>"; };
3C1ABD8A2B8F089100ADF97B /* MyPageSignOutConfirmView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageSignOutConfirmView.swift; sourceTree = "<group>"; };
3C2245282BF34C1A0095D3FB /* DontBePhotoDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DontBePhotoDetailView.swift; sourceTree = "<group>"; };
3C2854FC2B3A9FD800369C99 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = "<group>"; };
3C2854FE2B3AA01700369C99 /* ExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleView.swift; sourceTree = "<group>"; };
3C2855002B3AA0A000369C99 /* ExampleCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleCollectionViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -306,6 +310,7 @@
3CBF99282B56BD210015FE4B /* MypageProfileResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MypageProfileResponseDTO.swift; sourceTree = "<group>"; };
3CD25D262B5466DB0075F80F /* Empty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Empty.swift; sourceTree = "<group>"; };
3CD25D282B5482FE0075F80F /* DontBeBottomSheetButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DontBeBottomSheetButton.swift; sourceTree = "<group>"; };
3CE6B90C2BECBCA6002E2CDC /* Functions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Functions.swift; sourceTree = "<group>"; };
3CE9C1292B4BE6780086E4A3 /* WriteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteViewController.swift; sourceTree = "<group>"; };
3CE9C12B2B4BE7300086E4A3 /* WriteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteView.swift; sourceTree = "<group>"; };
3CE9C12D2B4C08AE0086E4A3 /* WriteTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteTextView.swift; sourceTree = "<group>"; };
Expand All @@ -331,6 +336,7 @@
2A8D70B12B4C4D8F009F4C6C /* KakaoSDK in Frameworks */,
3CFB30472BB305EE00A3F70A /* Amplitude in Frameworks */,
2FD9276A2B92245B0046193D /* Lottie in Frameworks */,
3C5F82B02BFB133700D2FE3F /* Kingfisher in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -690,6 +696,7 @@
isa = PBXGroup;
children = (
2F4BE0C52BD90EC4003147E7 /* AppStoreCheckManager.swift */,
3CE6B90C2BECBCA6002E2CDC /* Functions.swift */,
);
path = Shared;
sourceTree = "<group>";
Expand Down Expand Up @@ -1093,6 +1100,7 @@
3C2F544D2B50F65500E7BF01 /* DontBeBottomSheetView.swift */,
3CD25D282B5482FE0075F80F /* DontBeBottomSheetButton.swift */,
3CB634C92B59080E00DB9DA5 /* DontBeTransparencyGrayView.swift */,
3C2245282BF34C1A0095D3FB /* DontBePhotoDetailView.swift */,
3CE9C1342B4C4BC20086E4A3 /* CircleProgressbar.swift */,
2A2672042B4C3C00009D214F /* CancelBag.swift */,
2A8D70C22B4D7FF5009F4C6C /* BackButton.swift */,
Expand Down Expand Up @@ -1199,6 +1207,7 @@
2A8D70B02B4C4D8F009F4C6C /* KakaoSDK */,
2FD927692B92245B0046193D /* Lottie */,
3CFB30462BB305EE00A3F70A /* Amplitude */,
3C5F82AF2BFB133700D2FE3F /* Kingfisher */,
);
productName = DontBe;
productReference = 3C6192E92B3A719A00220CEB /* DontBe-iOS.app */;
Expand Down Expand Up @@ -1233,6 +1242,7 @@
2A8D70AF2B4C4D8F009F4C6C /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */,
2FD927682B92245B0046193D /* XCRemoteSwiftPackageReference "lottie-spm" */,
3CFB30452BB305EE00A3F70A /* XCRemoteSwiftPackageReference "Amplitude-iOS" */,
3C5F82AE2BFB133700D2FE3F /* XCRemoteSwiftPackageReference "Kingfisher" */,
);
productRefGroup = 3C6192EA2B3A719A00220CEB /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1287,6 +1297,7 @@
2F05B1A72B5799B700AC368D /* PostDetailResponseDTO.swift in Sources */,
3C61930C2B3A782100220CEB /* StringLiterals.swift in Sources */,
2FB64FF22B5318C50082A414 /* WriteReplyContentView.swift in Sources */,
3C2245292BF34C1A0095D3FB /* DontBePhotoDetailView.swift in Sources */,
2F8735462B4C34A500E55552 /* HomeCollectionView.swift in Sources */,
2FBBADFA2B54401A002D6286 /* DeletePopupViewController.swift in Sources */,
3CEE4CBD2B500A7800F506AF /* DontBeTransparencyInfoView.swift in Sources */,
Expand Down Expand Up @@ -1375,6 +1386,7 @@
2FBBADF12B53AF9B002D6286 /* PostDetailCollectionFooterView.swift in Sources */,
2FB64FF62B531E4F0082A414 /* WriteReplyEditorView.swift in Sources */,
2FB769D02B5277BD004C7752 /* PostReplyTextFieldView.swift in Sources */,
3CE6B90D2BECBCA6002E2CDC /* Functions.swift in Sources */,
2A2671FD2B4C3A9F009D214F /* LoginViewModel.swift in Sources */,
2FB818DC2B51875D00B7498F /* PostReplyCollectionViewCell.swift in Sources */,
2F0A98D32B58B8EF00AAE625 /* DeleteReplyPopupViewController.swift in Sources */,
Expand Down Expand Up @@ -1546,7 +1558,7 @@
CODE_SIGN_ENTITLEMENTS = "DontBe-iOS/DontBe-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = MAZQ6JDBT4;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "DontBe-iOS/Global/Resources/Info.plist";
Expand All @@ -1562,7 +1574,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.SOPT33.DontBe-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1584,7 +1596,7 @@
CODE_SIGN_ENTITLEMENTS = "DontBe-iOS/DontBe-iOS.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = MAZQ6JDBT4;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "DontBe-iOS/Global/Resources/Info.plist";
Expand All @@ -1600,7 +1612,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.SOPT33.DontBe-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1662,6 +1674,14 @@
minimumVersion = 4.4.1;
};
};
3C5F82AE2BFB133700D2FE3F /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/onevcat/Kingfisher.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 7.11.0;
};
};
3CFB30452BB305EE00A3F70A /* XCRemoteSwiftPackageReference "Amplitude-iOS" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/amplitude/Amplitude-iOS";
Expand All @@ -1688,6 +1708,11 @@
package = 2FD927682B92245B0046193D /* XCRemoteSwiftPackageReference "lottie-spm" */;
productName = Lottie;
};
3C5F82AF2BFB133700D2FE3F /* Kingfisher */ = {
isa = XCSwiftPackageProductDependency;
package = 3C5F82AE2BFB133700D2FE3F /* XCRemoteSwiftPackageReference "Kingfisher" */;
productName = Kingfisher;
};
3CFB30462BB305EE00A3F70A /* Amplitude */ = {
isa = XCSwiftPackageProductDependency;
package = 3CFB30452BB305EE00A3F70A /* XCRemoteSwiftPackageReference "Amplitude-iOS" */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "a04664d0969ba455e6e6696e590afa4d7878d5741b6b1e3bb7b11edd9fc58c87",
"originHash" : "74a68703609c00724d8fa5d77c9ef0723fac1493ecbf4612b13c4182b56fbd1f",
"pins" : [
{
"identity" : "alamofire",
Expand Down Expand Up @@ -37,6 +37,15 @@
"revision" : "ab226a7a3625d64e73a52aa3800595dab810156b"
}
},
{
"identity" : "kingfisher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/onevcat/Kingfisher.git",
"state" : {
"revision" : "5b92f029fab2cce44386d28588098b5be0824ef5",
"version" : "7.11.0"
}
},
{
"identity" : "lottie-spm",
"kind" : "remoteSourceControl",
Expand Down
16 changes: 4 additions & 12 deletions DontBe-iOS/DontBe-iOS/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
self.checkAndUpdateIfNeeded()
}

func sceneDidEnterBackground(_ scene: UIScene) {
Expand All @@ -90,17 +89,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

let splitCurrentProjectVersion = currentProjectVersion.split(separator: ".").map { $0 }

if splitCurrentProjectVersion.count > 0 && splitMarketingVersion.count > 0 {

if splitCurrentProjectVersion[0] < splitMarketingVersion[0] {
self.showUpdateAlert(version: marketingVersion)

} else if splitCurrentProjectVersion[1] < splitMarketingVersion[1] {
self.showUpdateAlert(version: marketingVersion)

} else {
print("현재 최신버전입니다.")
}
if currentProjectVersion < marketingVersion {
self.showUpdateAlert(version: marketingVersion)
} else {
print("현재 최신버전입니다.")
}
}
}
Expand Down
104 changes: 93 additions & 11 deletions DontBe-iOS/DontBe-iOS/Global/Extension/UIImageView+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,103 @@

import UIKit

import Kingfisher

extension UIImageView {
func load(url: String) {
if let url = URL(string: url) {
DispatchQueue.global().async { [weak self] in
if let data = try? Data(contentsOf: url) {
if let image = UIImage(data: data) {
DispatchQueue.main.async {
self?.image = image
self?.layer.cornerRadius = (self?.frame.size.width ?? 0) / 2.adjusted
self?.contentMode = .scaleAspectFill
self?.clipsToBounds = true
}
}
guard let url = URL(string: url) else { return }

self.kf.indicatorType = .activity
self.kf.setImage(
with: url,
placeholder: nil,
options: [
.scaleFactor(UIScreen.main.scale),
.cacheOriginalImage
]
) { result in
switch result {
case .success(let value):
DispatchQueue.main.async { [weak self] in
self?.image = value.image
self?.layer.cornerRadius = (self?.frame.size.width ?? 0) / 2.adjusted
self?.contentMode = .scaleAspectFill
self?.clipsToBounds = true
}
case .failure(let error):
print("Error loading image: \(error)")

DispatchQueue.main.async { [weak self] in
self?.layer.cornerRadius = (self?.frame.size.width ?? 0) / 2.adjusted
self?.contentMode = .scaleAspectFill
self?.clipsToBounds = true
}
}
}
}

func loadContentImage(url: String) {
guard let url = URL(string: url) else { return }
self.kf.indicatorType = .activity
self.kf.setImage(
with: url,
placeholder: nil,
options: [
.scaleFactor(UIScreen.main.scale),
.cacheOriginalImage
]
) { result in
switch result {
case .success(let value):
DispatchQueue.main.async {
self.image = value.image
self.layer.cornerRadius = 4.adjusted
self.contentMode = .scaleAspectFill
self.clipsToBounds = true
}
case .failure(let error):
print("Error loading image: \(error)")

self.layer.cornerRadius = 4.adjusted
self.contentMode = .scaleAspectFill
self.clipsToBounds = true
}
}
}
}

// Kingfisher 이전 이미지 로드 함수 아카이빙
//
// func load(url: String) {
// if let url = URL(string: url) {
// DispatchQueue.global().async { [weak self] in
// if let data = try? Data(contentsOf: url) {
// if let image = UIImage(data: data) {
// DispatchQueue.main.async {
// self?.image = image
// self?.layer.cornerRadius = (self?.frame.size.width ?? 0) / 2.adjusted
// self?.contentMode = .scaleAspectFill
// self?.clipsToBounds = true
// }
// }
// }
// }
// }
// }

// func loadContentImage(url: String) {
// if let url = URL(string: url) {
// DispatchQueue.global().async { [weak self] in
// if let data = try? Data(contentsOf: url) {
// if let image = UIImage(data: data) {
// DispatchQueue.main.async {
// self?.image = image
// self?.layer.cornerRadius = 4.adjusted
// self?.contentMode = .scaleAspectFill
// self?.clipsToBounds = true
// }
// }
// }
// }
// }
// }
3 changes: 2 additions & 1 deletion DontBe-iOS/DontBe-iOS/Global/Literals/ImageLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ enum ImageLiterals {
static var btnFavoriteActive: UIImage { .load(name: "favorite=btn_favorite_active") }
static var btnFavoriteInActive: UIImage { .load(name: "favorite=btn_favorite_default") }
static var icnDelete: UIImage { .load(name: "icn_delete") }
static var btnTransparent: UIImage { .load(name: "status=btn_ghost_default") }
static var btnTransparent: UIImage { .load(name: "btn_ghost_gray") }
}

enum Write {
static var imgWritingRestriction: UIImage { .load(name: "img_writing_restriction") }
static var imgBanText: UIImage { .load(name: "img_ban_text") }
static var btnLink: UIImage { .load(name: "btn_link") }
static var btnPhoto: UIImage { .load(name: "btn_photo") }
static var btnCloseLink: UIImage { .load(name: "btn_close_link") }
}

Expand Down
7 changes: 4 additions & 3 deletions DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enum StringLiterals {
enum Write {
static let writeNavigationTitle = "새로운 글"
static let writeNavigationBarButtonItemTitle = "취소"
static let writeContentPlaceholder = "무슨 고민이 있나요?"
static let writeContentPlaceholder = "어떤 생각을 하고 있나요?"
static let writeReplyContentPlaceholder = "님에게 답글 남기기..."
static let writePostButtonTitle = "게시"
static let writePopupContentLabel = "작성 중인 글을 삭제하시겠어요?"
static let writePopupCancleButtonTitle = "취소"
Expand Down Expand Up @@ -183,7 +184,7 @@ enum StringLiterals {
}

enum VersionUpdate {
static let versionTitle = "v 1.1.0 업데이트 안내\nDon't be가 업데이트 되었습니다."
static let versionMessage = "•눌러서 바로 이동할 수 있는 링크를 삽입할 수 있어요.\n•내 글에 답글을 달거나 좋아요를 누른 상대의 프로필로 이동할 수 있어요.\n•그 외 자잘한 오류들을 해결했어요."
static let versionTitle = "v 1.2.1 업데이트 안내\nDon't be가 업데이트 되었습니다."
static let versionMessage = "•글을 작성할 때 사진을 첨부할 수 있어요.\n•투명도 버튼 생김새와 터치 영역을 수정했어요.\n•그 외 자잘한 오류들을 해결했어요."
}
}
Loading