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

[CHORE] release1.0/6 -> develop 머지하기 #306

Merged
merged 21 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cee96f1
[FIX] #286 - 무한스크롤 오프셋 개선 및 로딩창 수정
hyun99999 Jan 1, 2022
0a335c6
[FIX] #286 - 무한스크롤 오프셋 개선 및 로딩창 수정
hyun99999 Jan 2, 2022
9c0a06a
[FIX] #286 - 무한스크롤 오프셋 개선 및 로딩창 수정
hyun99999 Jan 7, 2022
ada4d99
[CHORE] #291 - 로그인 버튼 레이아웃 조정
mini-min Jan 7, 2022
ee0b889
Merge pull request #295 from mini-min/release/#291
mini-min Jan 7, 2022
0a815d5
[CHORE] #294 - 앱 언어 한국어로 변경하기
dlwns33 Jan 7, 2022
4c1a691
Merge pull request #297 from dlwns33/release/#294
dlwns33 Jan 7, 2022
4955d01
[FEAT] #298 - 그룹명 collection view cell 객체 생성해서 데이터를 넣고 frame 의 size 를…
dlwns33 Jan 7, 2022
b35af0d
[FEAT] #296 - 온보딩 스플래시 뷰컨에 연결
mini-min Jan 7, 2022
e20f466
[CHORE] #296 - 생년월일 바텀시트 "2022년" 추가
mini-min Jan 7, 2022
1505a83
Merge pull request #299 from mini-min/release/#296
mini-min Jan 7, 2022
c55e70c
Merge pull request #300 from dlwns33/release/#298
dlwns33 Jan 7, 2022
dbb929e
Merge branch 'release1.0/6' of https://github.com/TeamNADA/NADA-iOS-F…
hyun99999 Jan 7, 2022
5870bb5
[FIX] #301 - 그룹 편집 뷰 그룹명 길이 제한
mini-min Jan 7, 2022
2644dbc
[FIX] #286 - 무한스크롤 오프셋 개선 및 로딩창 수정
hyun99999 Jan 7, 2022
3035bd4
Merge pull request #302 from mini-min/release/#301
mini-min Jan 7, 2022
5cc2c46
Merge pull request #303 from TeamNADA/release1.0/#286
hyun99999 Jan 7, 2022
1a6f3f0
[FIX] #304 - 로그인 카카오 버튼 수정
mini-min Jan 7, 2022
e8e5139
Merge remote-tracking branch 'TeamNADA/release1.0/6' into release/#304
mini-min Jan 7, 2022
75ad199
[CHORE] #304 - 로그인 카카오 버튼 수정
mini-min Jan 7, 2022
0e6a24e
Merge pull request #305 from mini-min/release/#304
mini-min Jan 7, 2022
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
2 changes: 1 addition & 1 deletion NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@
F8FC43A026C01F040033E151 /* ViewControllers */ = {
isa = PBXGroup;
children = (
397B75182763B5DA004AEB03 /* TeamNADA */,
397B750E2763A5DD004AEB03 /* OpenSource */,
397B75182763B5DA004AEB03 /* TeamNADA */,
77812945275F6E6A004B34F4 /* CardDetail */,
F8518059275D0468006BD5ED /* Onboarding */,
393E3343275F69DB00965BBF /* Splash */,
Expand Down
2 changes: 1 addition & 1 deletion NADA-iOS-forRelease/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<string>ko_KR</string>
<key>CFBundleDisplayName</key>
<string>나다 NADA</string>
<key>CFBundleExecutable</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "kakao_login_large_wide.png",
"filename" : "btn_kakaologin.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "kakao_login_large_wide@2x.png",
"filename" : "btn_kakaologin@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "kakao_login_large_wide@3x.png",
"filename" : "btn_kakaologin@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion NADA-iOS-forRelease/Resouces/Constants/Notification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ extension Notification.Name {
static let passDataToDetail = Notification.Name("passDataToDetail")
static let reloadGroupViewController = Notification.Name("reloadGroupViewController")
static let creationReloadMainCardSwiper = Notification.Name("creationReloadMainCardSwiper")
static let listReloadMainCardSwiper = Notification.Name("listReloadMainCardSwiper")
static let dismissQRCodeCardResult = Notification.Name("dismissQRCodeCardResult")
}
14 changes: 14 additions & 0 deletions NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ extension UIColor {
}
}

@nonobjc class var loadingBackground: UIColor {
if #available(iOS 13, *) {
return UIColor { (traitCollection: UITraitCollection) -> UIColor in
if traitCollection.userInterfaceStyle == .light {
return UIColor(white: 0, alpha: 0.2)
} else {
return UIColor(white: 0, alpha: 0.8)
}
}
} else {
return UIColor(white: 0, alpha: 0.2)
}
}

@nonobjc class var harmonyRed: UIColor {
return UIColor(red: 239.0 / 255.0, green: 115.0 / 255.0, blue: 115.0 / 255.0, alpha: 1.0)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="collection view cell content view" minToolsVersion="11.0"/>
Expand Down
12 changes: 1 addition & 11 deletions NADA-iOS-forRelease/Resouces/Storyboards/Login/Login.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,18 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logoNadaTxt2" translatesAutoresizingMaskIntoConstraints="NO" id="pLu-66-zQ4">
<rect key="frame" x="138" y="300" width="99" height="136"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="Bjc-le-F1v">
<rect key="frame" x="24" y="558" width="327" height="110"/>
<color key="backgroundColor" name="background"/>
<constraints>
<constraint firstAttribute="height" constant="110" id="zMJ-VE-Guw"/>
</constraints>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" name="background"/>
<constraints>
<constraint firstItem="Bjc-le-F1v" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="24" id="6Nz-5o-UZe"/>
<constraint firstItem="pLu-66-zQ4" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="256" id="Dv0-cl-BrI"/>
<constraint firstItem="Bjc-le-F1v" firstAttribute="centerX" secondItem="vDu-zF-Fre" secondAttribute="centerX" id="GgP-M2-9Iy"/>
<constraint firstItem="pLu-66-zQ4" firstAttribute="centerX" secondItem="vDu-zF-Fre" secondAttribute="centerX" id="NiW-DB-igj"/>
<constraint firstItem="pLu-66-zQ4" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="138" id="OP8-Rs-X3g"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="Bjc-le-F1v" secondAttribute="bottom" constant="110" id="oqH-i3-LWh"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="FOs-Km-lor"/>
<connections>
<outlet property="loginProviderStackView" destination="Bjc-le-F1v" id="xpW-XR-iPZ"/>
<outlet property="nadaImageView" destination="pLu-66-zQ4" id="zXX-8P-gdw"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -24,7 +24,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SOPT" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gYp-4q-F3G">
<rect key="frame" x="32" y="20" width="37.5" height="19"/>
<rect key="frame" x="32" y="20" width="311" height="19"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Bold" family="Spoqa Han Sans Neo" pointSize="14"/>
<color key="textColor" name="secondary"/>
<nil key="highlightedColor"/>
Expand All @@ -45,6 +45,7 @@
<constraint firstItem="gYp-4q-F3G" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="32" id="hj7-Lu-tmZ"/>
<constraint firstAttribute="bottom" secondItem="waV-UG-3wC" secondAttribute="bottom" id="plM-na-794"/>
<constraint firstItem="gYp-4q-F3G" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="u6L-vR-88A"/>
<constraint firstAttribute="trailing" secondItem="gYp-4q-F3G" secondAttribute="trailing" constant="32" id="w2o-Zf-yRN"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SelectBirthBottomSheetViewController: CommonBottomSheetViewController {

// MARK: - Properties

private let yearList: [String] = [Int](1950...2021).map { String($0) }.reversed()
private let yearList: [String] = [Int](1950...2022).map { String($0) }.reversed()
private let monthList: [String] = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
private let dayList: [String] = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"]
private var year = String()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CardCreationPreviewViewController: UIViewController {

lazy var loadingBgView: UIView = {
let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
bgView.backgroundColor = .bottomDimmedBackground
bgView.backgroundColor = .loadingBackground

return bgView
}()
Expand Down Expand Up @@ -246,6 +246,7 @@ extension CardCreationPreviewViewController {
""")
.setHeight(587)
nextVC.modalPresentationStyle = .overFullScreen

presentingVC.present(nextVC, animated: true) {
UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isFirstCard)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class CardListViewController: UIViewController {

// MARK: - IBAction Properties
@IBAction func dismissToPreviousView(_ sender: UIButton) {
NotificationCenter.default.post(name: .listReloadMainCardSwiper, object: nil)
self.navigationController?.popViewController(animated: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GroupViewController: UIViewController {

lazy var loadingBgView: UIView = {
let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
bgView.backgroundColor = .bottomDimmedBackground
bgView.backgroundColor = .loadingBackground

return bgView
}()
Expand Down Expand Up @@ -103,10 +103,16 @@ class GroupViewController: UIViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

offset = 0
frontCards?.removeAll()

groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "")
DispatchQueue.main.async {
self.setActivityIndicator()

self.offset = 0
self.frontCards?.removeAll()
}

DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "")
}
}
}

Expand Down Expand Up @@ -146,7 +152,7 @@ extension GroupViewController {
}

// MARK: - @objc Methods

@objc func didRecieveDataNotification(_ notification: Notification) {
selectedRow = notification.object as? Int ?? 0
}
Expand All @@ -155,7 +161,7 @@ extension GroupViewController {
private func relaodCardCollection() {
offset = 0
frontCards?.removeAll()

groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "")
}
}
Expand All @@ -172,7 +178,10 @@ extension GroupViewController {
self.groupCollectionView.reloadData()
self.groupId = group.groups[self.selectedRow].groupID
self.cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupId: group.groups[self.selectedRow].groupID, offset: 0)) {
self.cardsCollectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: false)
if self.frontCards?.count != 0 {
self.cardsCollectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: false)
}
self.isInfiniteScroll = true
}
}
case .requestErr(let message):
Expand All @@ -188,40 +197,30 @@ extension GroupViewController {
}

func cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest, completion: @escaping () -> Void = { }) {
DispatchQueue.main.async {
self.setActivityIndicator()
}

DispatchQueue.main.async {
GroupAPI.shared.cardListFetchInGroup(cardListInGroupRequest: cardListInGroupRequest) { response in
switch response {
case .success(let data):
self.activityIndicator.stopAnimating()
self.loadingBgView.removeFromSuperview()

self.isInfiniteScroll = true

if let cards = data as? CardsInGroupResponse {
self.frontCards?.append(contentsOf: cards.cards)
if self.frontCards?.count == 0 {
self.emptyView.isHidden = false
} else {
self.emptyView.isHidden = true
}
self.cardsCollectionView.reloadData()
GroupAPI.shared.cardListFetchInGroup(cardListInGroupRequest: cardListInGroupRequest) { response in
switch response {
case .success(let data):
self.activityIndicator.stopAnimating()
self.loadingBgView.removeFromSuperview()

if let cards = data as? CardsInGroupResponse {
self.frontCards?.append(contentsOf: cards.cards)
if self.frontCards?.count == 0 {
self.emptyView.isHidden = false
} else {
self.emptyView.isHidden = true
}
case .requestErr(let message):
print("cardListInGroupWithAPI - requestErr: \(message)")
case .pathErr:
print("cardListInGroupWithAPI - pathErr")
case .serverErr:
print("cardListInGroupWithAPI - serverErr")
case .networkFail:
print("cardListInGroupWithAPI - networkFail")
}
if self.frontCards?.count != 0 {
completion()
self.cardsCollectionView.reloadData()
}
completion()
case .requestErr(let message):
print("cardListInGroupWithAPI - requestErr: \(message)")
case .pathErr:
print("cardListInGroupWithAPI - pathErr")
case .serverErr:
print("cardListInGroupWithAPI - serverErr")
case .networkFail:
print("cardListInGroupWithAPI - networkFail")
}
}
}
Expand Down Expand Up @@ -254,12 +253,16 @@ extension GroupViewController {
// MARK: - UICollectionViewDelegate
extension GroupViewController: UICollectionViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if cardsCollectionView.contentOffset.y > cardsCollectionView.contentSize.height - cardsCollectionView.bounds.height {
if isInfiniteScroll {
isInfiniteScroll = false
offset += 1

cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupId: serverGroups?.groups[self.selectedRow].groupID ?? -1, offset: offset))
if scrollView == cardsCollectionView {
if cardsCollectionView.contentOffset.y > cardsCollectionView.contentSize.height - cardsCollectionView.bounds.height {
if isInfiniteScroll {
isInfiniteScroll = false
offset += 1

cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupId: serverGroups?.groups[self.selectedRow].groupID ?? -1, offset: offset)) {
self.isInfiniteScroll = true
}
}
}
}
}
Expand Down Expand Up @@ -326,10 +329,19 @@ extension GroupViewController: UICollectionViewDataSource {
groupId = serverGroups?.groups[indexPath.row].groupID
offset = 0
frontCards?.removeAll()
cardListInGroupWithAPI(cardListInGroupRequest:
CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "",
groupId: serverGroups?.groups[indexPath.row].groupID ?? 0,
offset: 0))

DispatchQueue.main.async {
self.setActivityIndicator()
}

DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.cardListInGroupWithAPI(cardListInGroupRequest:
CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "",
groupId: self.serverGroups?.groups[indexPath.row].groupID ?? 0,
offset: 0)) {
self.isInfiniteScroll = true
}
}
case cardsCollectionView:
cardDetailFetchWithAPI(cardID: frontCards?[indexPath.row].cardID ?? "")
default:
Expand All @@ -347,11 +359,12 @@ extension GroupViewController: UICollectionViewDelegateFlowLayout {

switch collectionView {
case groupCollectionView:
if serverGroups?.groups[indexPath.row].groupName.count ?? 0 > 4 {
width = CGFloat(serverGroups?.groups[indexPath.row].groupName.count ?? 0) * 16
} else {
width = 62
guard let cell = groupCollectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.groupCollectionViewCell, for: indexPath) as? GroupCollectionViewCell else {
return .zero
}
cell.groupName.text = serverGroups?.groups[indexPath.row].groupName
cell.groupName.sizeToFit()
width = cell.groupName.frame.width + 30
height = collectionView.frame.size.height
case cardsCollectionView:
width = collectionView.frame.size.width/2 - collectionView.frame.size.width * 8/327
Expand Down
Loading