Skip to content

Commit

Permalink
Merge pull request #5 from SWU-ECHO-CHAMBER/feat/#2-MyPageTab
Browse files Browse the repository at this point in the history
Feat/#2 my page tab
  • Loading branch information
AlwaysFighting authored Jul 22, 2023
2 parents 4f1d901 + 16c5371 commit c63240e
Show file tree
Hide file tree
Showing 23 changed files with 962 additions and 23 deletions.
46 changes: 37 additions & 9 deletions EchoChamber/EchoChamber.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
5109E8622A6C3AAC00AEC01E /* MyPageCollectionViewHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5109E8612A6C3AAC00AEC01E /* MyPageCollectionViewHeader.swift */; };
510D86862A67D3C1008DCF16 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D86852A67D3C1008DCF16 /* LaunchViewController.swift */; };
510D86892A67D3E6008DCF16 /* LoginViewcontroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D86882A67D3E6008DCF16 /* LoginViewcontroller.swift */; };
510D868C2A67D935008DCF16 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 510D868B2A67D935008DCF16 /* SnapKit */; };
Expand All @@ -20,13 +21,20 @@
512845AA2A6961D600BD02EE /* HomeCollectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512845A92A6961D600BD02EE /* HomeCollectionHeaderView.swift */; };
512845AC2A6962EC00BD02EE /* Inset+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512845AB2A6962EC00BD02EE /* Inset+.swift */; };
512845B02A69961700BD02EE /* DetailNewsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512845AF2A69961700BD02EE /* DetailNewsViewController.swift */; };
513619242A69B1FE00E5925D /* Extension+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 513619232A69B1FE00E5925D /* Extension+.swift */; };
518697F62A6A6BAD0066F501 /* Divider+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518697F52A6A6BAD0066F501 /* Divider+.swift */; };
518697F82A6A6D440066F501 /* EditProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518697F72A6A6D440066F501 /* EditProfileViewController.swift */; };
518697FA2A6A79260066F501 /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518697F92A6A79260066F501 /* SettingViewController.swift */; };
518697FE2A6AA76E0066F501 /* SettingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518697FD2A6AA76E0066F501 /* SettingTableViewCell.swift */; };
518698022A6AD9780066F501 /* MypageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518698012A6AD9780066F501 /* MypageCollectionViewCell.swift */; };
51B535DF2A542EC500FB64BE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51B535DE2A542EC500FB64BE /* AppDelegate.swift */; };
51B535E12A542EC500FB64BE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51B535E02A542EC500FB64BE /* SceneDelegate.swift */; };
51B535E82A542EC500FB64BE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 51B535E72A542EC500FB64BE /* Assets.xcassets */; };
51B535EB2A542EC500FB64BE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51B535E92A542EC500FB64BE /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
5109E8612A6C3AAC00AEC01E /* MyPageCollectionViewHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageCollectionViewHeader.swift; sourceTree = "<group>"; };
510D86852A67D3C1008DCF16 /* LaunchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchViewController.swift; sourceTree = "<group>"; };
510D86882A67D3E6008DCF16 /* LoginViewcontroller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewcontroller.swift; sourceTree = "<group>"; };
510D86912A680A56008DCF16 /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = "<group>"; };
Expand All @@ -37,6 +45,12 @@
512845A92A6961D600BD02EE /* HomeCollectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCollectionHeaderView.swift; sourceTree = "<group>"; };
512845AB2A6962EC00BD02EE /* Inset+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Inset+.swift"; sourceTree = "<group>"; };
512845AF2A69961700BD02EE /* DetailNewsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailNewsViewController.swift; sourceTree = "<group>"; };
513619232A69B1FE00E5925D /* Extension+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extension+.swift"; sourceTree = "<group>"; };
518697F52A6A6BAD0066F501 /* Divider+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Divider+.swift"; sourceTree = "<group>"; };
518697F72A6A6D440066F501 /* EditProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileViewController.swift; sourceTree = "<group>"; };
518697F92A6A79260066F501 /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = "<group>"; };
518697FD2A6AA76E0066F501 /* SettingTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTableViewCell.swift; sourceTree = "<group>"; };
518698012A6AD9780066F501 /* MypageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MypageCollectionViewCell.swift; sourceTree = "<group>"; };
51B535DB2A542EC500FB64BE /* EchoChamber.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EchoChamber.app; sourceTree = BUILT_PRODUCTS_DIR; };
51B535DE2A542EC500FB64BE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
51B535E02A542EC500FB64BE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -62,6 +76,7 @@
510D86842A67D3B4008DCF16 /* Scene */ = {
isa = PBXGroup;
children = (
518697F42A6A6B9E0066F501 /* Custom */,
510D869C2A68567B008DCF16 /* MyPage */,
510D86872A67D3DC008DCF16 /* Login */,
510D86962A6853AD008DCF16 /* Home */,
Expand All @@ -84,6 +99,7 @@
children = (
510D86912A680A56008DCF16 /* Color+.swift */,
512845AB2A6962EC00BD02EE /* Inset+.swift */,
513619232A69B1FE00E5925D /* Extension+.swift */,
);
path = Extension;
sourceTree = "<group>";
Expand All @@ -98,7 +114,6 @@
510D86962A6853AD008DCF16 /* Home */ = {
isa = PBXGroup;
children = (
510D86982A685440008DCF16 /* Model */,
510D86972A68542F008DCF16 /* View */,
);
path = Home;
Expand All @@ -107,21 +122,14 @@
510D86972A68542F008DCF16 /* View */ = {
isa = PBXGroup;
children = (
512845A52A692EDE00BD02EE /* TodayNewsCollectionViewCell.swift */,
510D86942A6853AA008DCF16 /* HomeViewController.swift */,
512845A92A6961D600BD02EE /* HomeCollectionHeaderView.swift */,
512845AF2A69961700BD02EE /* DetailNewsViewController.swift */,
);
path = View;
sourceTree = "<group>";
};
510D86982A685440008DCF16 /* Model */ = {
isa = PBXGroup;
children = (
512845A52A692EDE00BD02EE /* TodayNewsCollectionViewCell.swift */,
);
path = Model;
sourceTree = "<group>";
};
510D869B2A68551E008DCF16 /* Navigation */ = {
isa = PBXGroup;
children = (
Expand All @@ -133,11 +141,24 @@
510D869C2A68567B008DCF16 /* MyPage */ = {
isa = PBXGroup;
children = (
518697F72A6A6D440066F501 /* EditProfileViewController.swift */,
518698012A6AD9780066F501 /* MypageCollectionViewCell.swift */,
518697F92A6A79260066F501 /* SettingViewController.swift */,
518697FD2A6AA76E0066F501 /* SettingTableViewCell.swift */,
510D869D2A685689008DCF16 /* MyPageViewController.swift */,
5109E8612A6C3AAC00AEC01E /* MyPageCollectionViewHeader.swift */,
);
path = MyPage;
sourceTree = "<group>";
};
518697F42A6A6B9E0066F501 /* Custom */ = {
isa = PBXGroup;
children = (
518697F52A6A6BAD0066F501 /* Divider+.swift */,
);
path = Custom;
sourceTree = "<group>";
};
51B535D22A542EC500FB64BE = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -251,10 +272,17 @@
files = (
510D86892A67D3E6008DCF16 /* LoginViewcontroller.swift in Sources */,
510D86922A680A56008DCF16 /* Color+.swift in Sources */,
513619242A69B1FE00E5925D /* Extension+.swift in Sources */,
518697FA2A6A79260066F501 /* SettingViewController.swift in Sources */,
518697F62A6A6BAD0066F501 /* Divider+.swift in Sources */,
510D869A2A68551B008DCF16 /* TabBarController.swift in Sources */,
512845AA2A6961D600BD02EE /* HomeCollectionHeaderView.swift in Sources */,
512845B02A69961700BD02EE /* DetailNewsViewController.swift in Sources */,
51B535DF2A542EC500FB64BE /* AppDelegate.swift in Sources */,
518697F82A6A6D440066F501 /* EditProfileViewController.swift in Sources */,
518697FE2A6AA76E0066F501 /* SettingTableViewCell.swift in Sources */,
518698022A6AD9780066F501 /* MypageCollectionViewCell.swift in Sources */,
5109E8622A6C3AAC00AEC01E /* MyPageCollectionViewHeader.swift in Sources */,
51B535E12A542EC500FB64BE /* SceneDelegate.swift in Sources */,
512845A62A692EDE00BD02EE /* TodayNewsCollectionViewCell.swift in Sources */,
510D86862A67D3C1008DCF16 /* LaunchViewController.swift in Sources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "F198D9F9-AF43-4A85-9BED-94C4D1A259D3"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "DE8406D4-F345-44AB-9595-1AF8B85BC54E"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "EchoChamber/Scene/MyPage/SettingViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "45"
endingLineNumber = "45"
landmarkName = "tableView(_:numberOfRowsInSection:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
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,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Arrow.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions EchoChamber/EchoChamber/Assets.xcassets/MyPage/Contents.json
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,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "MyProfile.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Pencil.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "camera.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
2 changes: 2 additions & 0 deletions EchoChamber/EchoChamber/Extension/Color+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ extension UIColor {

static var systemGrayColor = #colorLiteral(red: 0.5369143486, green: 0.5369143486, blue: 0.5369143486, alpha: 1)

static var dividerColor = #colorLiteral(red: 0.9843137255, green: 0.9843137255, blue: 0.9843137255, alpha: 1)

static var errorColor = #colorLiteral(red: 1, green: 0.3044154346, blue: 0.2612361312, alpha: 1)
}

18 changes: 18 additions & 0 deletions EchoChamber/EchoChamber/Extension/Extension+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// Extension+.swift
// EchoChamber
//
// Created by 목정아 on 2023/07/21.
//

import UIKit

extension UIImage {
func resize(to size: CGSize) -> UIImage {
UIGraphicsBeginImageContextWithOptions(size, false, UIScreen.main.scale)
self.draw(in: CGRect(origin: .zero, size: size))
let resizedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return resizedImage ?? self
}
}
35 changes: 35 additions & 0 deletions EchoChamber/EchoChamber/Scene/Custom/Divider+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Divider+.swift
// EchoChamber
//
// Created by 목정아 on 2023/07/21.
//

import UIKit

final class SeparatorView: UIView {

private lazy var separator: UIView = {
let separator = UIView()
separator.backgroundColor = .dividerColor

return separator
}()

override init(frame: CGRect) {
super.init(frame: frame)

addSubview(separator)

separator.snp.makeConstraints {
$0.leading.equalToSuperview()
$0.trailing.equalToSuperview()
$0.top.equalToSuperview()
$0.height.equalTo(11.0)
}
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
33 changes: 20 additions & 13 deletions EchoChamber/EchoChamber/Scene/Home/View/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,27 @@ extension HomeViewController : UICollectionViewDelegate {
private extension HomeViewController {
func setupNavigationController() {

let logoContainer = UIView(frame: CGRect(x: 0, y: 0, width: (UIScreen.main.bounds.width - 100), height: 39))
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 89, height: 39))
imageView.contentMode = .scaleAspectFit

let image = #imageLiteral(resourceName: "Logo")
imageView.image = image


logoContainer.addSubview(imageView)
navigationItem.titleView = logoContainer
navigationItem.largeTitleDisplayMode = .never
navigationController?.navigationBar.prefersLargeTitles = true
let leftFixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
leftFixedSpace.width = 36.0

let rightFixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
rightFixedSpace.width = 20.0

if let originalImage = UIImage(named: "Logo") {

let imageSize = CGSize(width: 89, height: 39)
let resizedImage = originalImage.resize(to: imageSize)

let imageView = UIImageView(image: resizedImage)
imageView.frame = CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height)

let logoButton = UIBarButtonItem(customView: imageView)

navigationItem.leftBarButtonItems = [leftFixedSpace, logoButton]
}

let searchButton = UIBarButtonItem(image: UIImage(systemName: "magnifyingglass"), style: .plain, target: self, action: nil)
navigationItem.rightBarButtonItem = searchButton

navigationItem.rightBarButtonItems = [rightFixedSpace, searchButton]
}
}
Loading

0 comments on commit c63240e

Please sign in to comment.