Skip to content

Commit

Permalink
[Merge] CDS-Mobile1#27 - Pull Develop
Browse files Browse the repository at this point in the history
  • Loading branch information
joonBaek12 committed Jun 3, 2023
2 parents 198d0af + 62b50ed commit ea56562
Show file tree
Hide file tree
Showing 52 changed files with 1,546 additions and 40 deletions.
95 changes: 81 additions & 14 deletions Instagram-iOS/Instagram-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@ extension UITextField {
rightViewMode = .always
}
}

func setAttributedPlaceholder(of string: String, with color: UIColor) {
let attributedText = NSAttributedString(
string: string,
attributes: [.foregroundColor: color]
)
self.attributedPlaceholder = attributedText
}
}

20 changes: 19 additions & 1 deletion Instagram-iOS/Instagram-iOS/Global/Literal/ImageLiteral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum ImageLiteral {
static let search = UIImage.load(name: "searchDm")
}

static let back = UIImage.load(name: "back")
static let back = UIImage.load(name: "Back")
}

enum TabBar {
Expand All @@ -47,6 +47,8 @@ enum ImageLiteral {
enum Story {
enum Top {
static let tagged = UIImage.load(name: "tagged")
static let setting = UIImage.load(name: "setting")
static let sampleProfileImage = UIImage.load(name: "sampleProfileImage")
}

enum Bottom {
Expand All @@ -70,6 +72,22 @@ enum ImageLiteral {
static let rightChevron = UIImage.load(name: "rightChevron")
}

enum Post {
static let settingMore = UIImage.load(name: "settingMore")

static let likeBlack = UIImage.load(name: "likeBlack")
static let likeBlackFilled = UIImage.load(name: "likeBlackFilled")
static let comment = UIImage.load(name: "comment")
static let dmBlack = UIImage.load(name: "dmBlack")
static let save = UIImage.load(name: "save")
}

enum Recommend {
static let castle = UIImage.load(name: "castle")
static let sung = UIImage.load(name: "sung")
static let kim = UIImage.load(name: "kim")
}

}

extension UIImage {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@
{
"images" : [
{
"filename" : "Comment.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "sampleProfileImage.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Save.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@
{
"images" : [
{
"filename" : "setting.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "setting_more.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@
{
"images" : [
{
"filename" : "Ellipse 40.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Ellipse [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Ellipse [email protected]",
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@
{
"images" : [
{
"filename" : "IMG_0393 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "IMG_0393 [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "IMG_0393 [email protected]",
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@
{
"images" : [
{
"filename" : "Ellipse 39.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Ellipse [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Ellipse [email protected]",
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion Instagram-iOS/Instagram-iOS/Global/Supports/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BASE_URL</key>
<string>$(BASE_URL)</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIAppFonts</key>
<array>
<string>SF-Pro-Text-Medium.otf</string>
<string>SF-Pro-Text-Regular.otf</string>
<string>SF-Pro-Text-Semibold.otf</string>
<string>SF-Pro-Text-Bold.ttf</string>
<string>SF-Pro-Text-Bold.ttf</string>
<string>AppleSDGothicNeoSB.ttf</string>
<string>AppleSDGothicNeoB.ttf</string>
<string>AppleSDGothicNeoM.ttf</string>
Expand Down
24 changes: 24 additions & 0 deletions Instagram-iOS/Instagram-iOS/Global/UIComponent/CommonButton.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// CommonButton.swift
// Instagram-iOS
//
// Created by 이성민 on 2023/05/23.
//

import UIKit

final class CommonButton: UIButton {

// MARK: - Life Cycle

init(with image: UIImage) {
super.init(frame: .init(x: 0, y: 0, width: 24, height: 24))

self.setImage(image, for: .normal)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,8 @@ final class UserProfileView: UIView {
return colors
}

func addProfileButtonAction(_ action: UIAction) {
profileImageButtonView.addAction(action, for: .touchUpInside)
}

}
8 changes: 0 additions & 8 deletions Instagram-iOS/Instagram-iOS/Network/API/API.swift

This file was deleted.

36 changes: 36 additions & 0 deletions Instagram-iOS/Instagram-iOS/Network/API/Config.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Config.swift
// Instagram-iOS
//
// Created by 김사랑 on 2023/05/15.
//

import Foundation

enum Config {

enum Keys {
enum Plist {
static let baseUrl = "BASE_URL"
}
}

private static let infoDictionary: [String: Any] = {
guard let dict = Bundle.main.infoDictionary else {
fatalError("plist cannot be found.")
}
return dict
}()

}

extension Config {

static let baseUrl: String = {
guard let key = Config.infoDictionary[Keys.Plist.baseUrl] as? String
else { fatalError("baseURL not found") }
return key
}()

}

18 changes: 18 additions & 0 deletions Instagram-iOS/Instagram-iOS/Network/API/NetworkResult.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// NetworkResult.swift
// Instagram-iOS
//
// Created by 이성민 on 2023/05/26.
//

import Foundation

enum NetworkResult<T> {

case success(T)
case requestError(T)
case pathError
case serverError
case networkError

}
Loading

0 comments on commit ea56562

Please sign in to comment.