-
Notifications
You must be signed in to change notification settings - Fork 2
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] 마이페이지 메인 화면 구현 #214
Changes from 20 commits
cde40f0
3e1547e
e1dabcc
5fd5967
a0c672e
475a8f0
a70724f
dc3238e
804d232
739ce80
20419e8
60623a9
79e7e78
d37e1fd
1ddc840
70596cc
7a0c64c
c4d5a71
a258960
244f588
85bd699
8ab40f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "unfoldedArrow.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "unfoldedArrow@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "unfoldedArrow@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "pencil.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "pencil@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "pencil@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "setting.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "setting@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "setting@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "unfoldedArrow.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "unfoldedArrow@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "unfoldedArrow@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,32 @@ extension CALayer { | |
let rect = bounds.insetBy(dx: dxValue, dy: dxValue) | ||
shadowPath = UIBezierPath(rect: rect).cgPath | ||
} | ||
|
||
func addBorder( | ||
_ arr_edge: [UIRectEdge], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 컨벤션에 맞게 설정 부탁드립니다! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. arr_edge -> edges 로 변경했습니다! |
||
color: UIColor, | ||
width: CGFloat | ||
) { | ||
for edge in arr_edge { | ||
let border = CALayer() | ||
switch edge { | ||
case UIRectEdge.top: | ||
border.frame = CGRect.init(x: 0, y: 0, width: frame.width, height: width) | ||
break | ||
case UIRectEdge.bottom: | ||
border.frame = CGRect.init(x: 0, y: frame.height - width, width: frame.width, height: width) | ||
break | ||
case UIRectEdge.left: | ||
border.frame = CGRect.init(x: 0, y: 0, width: width, height: frame.height) | ||
break | ||
case UIRectEdge.right: | ||
border.frame = CGRect.init(x: frame.width - width, y: 0, width: width, height: frame.height) | ||
break | ||
default: | ||
break | ||
} | ||
border.backgroundColor = color.cgColor; | ||
self.addSublayer(border) | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// MyInfoResponse.swift | ||
// PLUB | ||
// | ||
// Created by 김수빈 on 2023/03/12. | ||
// | ||
|
||
import Foundation | ||
|
||
struct MyInfoResponse: Codable { | ||
let email: String | ||
let nickname: String | ||
let socialType: String | ||
let birthday: String | ||
let gender: String | ||
let introduce: String | ||
let profileImage: String? | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// MyPlubbingParameter.swift | ||
// PLUB | ||
// | ||
// Created by 김수빈 on 2023/03/13. | ||
// | ||
|
||
import Foundation | ||
|
||
struct MyPlubbingParameter: Encodable { | ||
let status: String | ||
let cursorId: Int | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// MyPlubbingResponse.swift | ||
// PLUB | ||
// | ||
// Created by 김수빈 on 2023/03/13. | ||
// | ||
|
||
import Foundation | ||
|
||
enum PlubbingStatusType: String, CaseIterable { | ||
case recruiting = "RECRUITING" | ||
case waiting = "WAITING" | ||
case active = "ACTIVE" | ||
case end = "END" | ||
} | ||
|
||
struct MyPlubbingResponse: Codable { | ||
let plubbingStatus: PlubbingStatusType.RawValue | ||
let plubbings: [MyPagePlubbing] | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case plubbingStatus | ||
case plubbings | ||
} | ||
} | ||
|
||
struct MyPagePlubbing: Codable { | ||
let plubbingID: Int | ||
let name: String | ||
let goal: String | ||
let iconImage: String | ||
let myPlubbingStatus: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case plubbingID = "plubbingId" | ||
case name = "title" | ||
case goal, iconImage, myPlubbingStatus | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// MyPageRouter.swift | ||
// PLUB | ||
// | ||
// Created by 김수빈 on 2023/03/13. | ||
// | ||
|
||
import Alamofire | ||
|
||
enum MyPageRouter { | ||
case inquireMyMeeting(MyPlubbingParameter) | ||
} | ||
|
||
extension MyPageRouter: Router { | ||
var method: HTTPMethod { | ||
switch self { | ||
case .inquireMyMeeting: | ||
return .get | ||
} | ||
} | ||
|
||
var path: String { | ||
switch self { | ||
case .inquireMyMeeting: | ||
return "/plubbings/all/my" | ||
} | ||
} | ||
|
||
var parameters: ParameterType { | ||
switch self { | ||
case .inquireMyMeeting(let parameter): | ||
return .query(parameter) | ||
} | ||
} | ||
|
||
var headers: HeaderType { | ||
switch self { | ||
case .inquireMyMeeting: | ||
return .withAccessToken | ||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||
// | ||||||
// MyPageService.swift | ||||||
// PLUB | ||||||
// | ||||||
// Created by 김수빈 on 2023/03/13. | ||||||
// | ||||||
|
||||||
import RxSwift | ||||||
|
||||||
class MyPageService: BaseService { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ㅎㅎ..
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 수정했습니다!! |
||||||
static let shared = MyPageService() | ||||||
|
||||||
private override init() { } | ||||||
} | ||||||
|
||||||
extension MyPageService { | ||||||
func inquireMyMeeting( | ||||||
status: PlubbingStatusType, | ||||||
cursorID: Int | ||||||
) -> PLUBResult<MyPlubbingResponse> { | ||||||
return sendRequest( | ||||||
MyPageRouter.inquireMyMeeting( | ||||||
.init( | ||||||
status:status.rawValue, | ||||||
cursorId: cursorID | ||||||
) | ||||||
), type: MyPlubbingResponse.self) | ||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 로그인 파트에서 프로필 설정할 때 쓰였던 코드에 있기는 한데, 이건 테두리 없는 버전이라 다음과 같이 코드를 짰었어요.
교체하는 게 나으려나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 이건 안바꾸셔도 괜찮을 것 같습니다!
저는 특정 부분만 border를 추가하고 싶어서 저 함수를 추가했어요!