Skip to content

Commit eb6fa48

Browse files
authored
Merge pull request #66 from boostcamp3-iOS/develop
Develop merge to Master
2 parents e3eeef3 + adaf9bb commit eb6fa48

File tree

132 files changed

+4612
-1268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+4612
-1268
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj binary

OneDay/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pbxproj binary
2+

OneDay/OneDay.xcodeproj/project.pbxproj

Lines changed: 188 additions & 65 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1010"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "D561691E21FAD07000E00FED"
18+
BuildableName = "OneDay.app"
19+
BlueprintName = "OneDay"
20+
ReferencedContainer = "container:OneDay.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "D50276C621FEFC8400A0DB5E"
36+
BuildableName = "OneDayTests.xctest"
37+
BlueprintName = "OneDayTests"
38+
ReferencedContainer = "container:OneDay.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "D561691E21FAD07000E00FED"
46+
BuildableName = "OneDay.app"
47+
BlueprintName = "OneDay"
48+
ReferencedContainer = "container:OneDay.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<BuildableProductRunnable
65+
runnableDebuggingMode = "0">
66+
<BuildableReference
67+
BuildableIdentifier = "primary"
68+
BlueprintIdentifier = "D561691E21FAD07000E00FED"
69+
BuildableName = "OneDay.app"
70+
BlueprintName = "OneDay"
71+
ReferencedContainer = "container:OneDay.xcodeproj">
72+
</BuildableReference>
73+
</BuildableProductRunnable>
74+
<AdditionalOptions>
75+
</AdditionalOptions>
76+
</LaunchAction>
77+
<ProfileAction
78+
buildConfiguration = "Release"
79+
shouldUseLaunchSchemeArgsEnv = "YES"
80+
savedToolIdentifier = ""
81+
useCustomWorkingDirectory = "NO"
82+
debugDocumentVersioning = "YES">
83+
<BuildableProductRunnable
84+
runnableDebuggingMode = "0">
85+
<BuildableReference
86+
BuildableIdentifier = "primary"
87+
BlueprintIdentifier = "D561691E21FAD07000E00FED"
88+
BuildableName = "OneDay.app"
89+
BlueprintName = "OneDay"
90+
ReferencedContainer = "container:OneDay.xcodeproj">
91+
</BuildableReference>
92+
</BuildableProductRunnable>
93+
</ProfileAction>
94+
<AnalyzeAction
95+
buildConfiguration = "Debug">
96+
</AnalyzeAction>
97+
<ArchiveAction
98+
buildConfiguration = "Release"
99+
revealArchiveInOrganizer = "YES">
100+
</ArchiveAction>
101+
</Scheme>

OneDay/OneDay/AppDelegate/AppDelegate.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414

1515
var window: UIWindow?
1616

17-
// MARK: - Core Data stack
18-
lazy var coreDataStack = CoreDataStack(modelName: "OneDay")
19-
2017
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
21-
// guard let navController = window?.rootViewController as? UINavigationController,
22-
// let viewController = navController.topViewController as? SampleCoreDataViewController else {
23-
// return true
24-
// }
25-
//
26-
// viewController.managedObjectContext = coreDataStack.managedContext
2718

2819
//사용자 위치정보 권한 요청
2920
LocationService.service.requestAuth()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// AddActionViewController.swift
3+
// OneDay
4+
//
5+
// Created by juhee on 14/02/2019.
6+
// Copyright © 2019 teamA2. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
class AddActionViewController: UIViewController {
12+
13+
}
14+
15+
extension AddActionViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
16+
17+
func imagePickerController(_ picker: UIImagePickerController,
18+
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]
19+
) {
20+
picker.dismiss(animated: true, completion: nil)
21+
createEntryWithImage(pickingMediaWithInfo: info)
22+
}
23+
}

OneDay/OneDay/Controller/BaseSlidingViewController.swift

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@
99
import UIKit
1010

1111
class BaseSlidingViewController: UIViewController {
12-
1312
fileprivate var isMenuOpened = false
1413
fileprivate var isStatusBarHidden = false
1514

1615
fileprivate var baseMainViewLeftConstraint: NSLayoutConstraint!
1716
fileprivate var baseMainViewRightConstraint: NSLayoutConstraint!
18-
fileprivate let sideWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height)*0.75
19-
fileprivate let containerLayoutOffset: CGFloat = 24
17+
fileprivate let sideWidth = UIScreen.main.bounds.width*0.75
2018

2119
var statusBarAnimator = UIViewPropertyAnimator()
2220

2321
let baseMainView: UIView = {
2422
let view = UIView()
23+
view.backgroundColor = .doBlue
2524
view.translatesAutoresizingMaskIntoConstraints = false
2625
return view
2726
}()
@@ -51,6 +50,7 @@ class BaseSlidingViewController: UIViewController {
5150

5251
override func viewDidLoad() {
5352
super.viewDidLoad()
53+
view.backgroundColor = .doBlue
5454
setupViews()
5555
setupViewControllers()
5656
setupGesture()
@@ -91,10 +91,12 @@ class BaseSlidingViewController: UIViewController {
9191

9292
switch gesture.state {
9393
case .began:
94-
9594
isStatusBarHidden = !isStatusBarHidden
9695

97-
statusBarAnimator = UIViewPropertyAnimator(duration: 0.1, curve: .easeOut, animations: {
96+
statusBarAnimator = UIViewPropertyAnimator(
97+
duration: 0.1,
98+
curve: .easeOut,
99+
animations: {
98100
self.setNeedsStatusBarAppearanceUpdate()
99101
})
100102
statusBarAnimator.startAnimation()
@@ -138,7 +140,7 @@ class BaseSlidingViewController: UIViewController {
138140
self.setNeedsStatusBarAppearanceUpdate()
139141

140142
isMenuOpened = true
141-
baseMainViewLeftConstraint.constant = sideWidth + containerLayoutOffset
143+
baseMainViewLeftConstraint.constant = sideWidth
142144
baseMainViewRightConstraint.constant = sideWidth
143145
performAnimation()
144146

@@ -149,52 +151,67 @@ class BaseSlidingViewController: UIViewController {
149151
self.setNeedsStatusBarAppearanceUpdate()
150152
isStatusBarHidden = false
151153
self.setNeedsStatusBarAppearanceUpdate()
154+
152155
isMenuOpened = false
153156
baseMainViewLeftConstraint.constant = 0
154157
baseMainViewRightConstraint.constant = 0
155158
performAnimation()
156159
}
157160

158161
fileprivate func performAnimation() {
159-
UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
160-
self.blurCoverView.alpha = self.isMenuOpened ? 1 : 0
161-
self.view.layoutIfNeeded()
162-
}, completion: nil)
162+
UIView.animate(
163+
withDuration: 0.3,
164+
delay: 0,
165+
usingSpringWithDamping: 1,
166+
initialSpringVelocity: 1,
167+
options: .curveEaseOut,
168+
animations: {
169+
self.blurCoverView.alpha = self.isMenuOpened ? 1 : 0
170+
self.view.layoutIfNeeded() },
171+
completion: nil)
163172
}
164173

165174
fileprivate func setupViews() {
166175
view.addSubview(baseMainView)
167-
baseMainView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
176+
baseMainView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
168177
baseMainView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
169-
170-
baseMainViewRightConstraint = baseMainView.rightAnchor.constraint(equalTo: view.rightAnchor)
178+
baseMainViewRightConstraint = baseMainView.rightAnchor.constraint(
179+
equalTo: view.rightAnchor)
171180
baseMainViewRightConstraint.isActive = true
172181

173182
baseMainViewLeftConstraint = baseMainView.leftAnchor.constraint(equalTo: view.leftAnchor)
174183
baseMainViewLeftConstraint.isActive = true
175184

176185
view.addSubview(baseSideView)
177186
baseSideView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
178-
baseSideView.rightAnchor.constraint(equalTo: baseMainView.safeAreaLayoutGuide.leftAnchor, constant: -containerLayoutOffset).isActive = true
187+
baseSideView.rightAnchor.constraint(
188+
equalTo: baseMainView.safeAreaLayoutGuide.leftAnchor).isActive = true
179189
baseSideView.bottomAnchor.constraint(equalTo: baseMainView.bottomAnchor).isActive = true
180190
baseSideView.widthAnchor.constraint(equalToConstant: sideWidth).isActive = true
181191
}
182192

183193
fileprivate func setupViewControllers() {
184-
guard let mainViewController: MainTabBarViewController = storyboard?.instantiateViewController(withIdentifier: "tabMain") as? MainTabBarViewController else {
194+
guard let mainViewController: MainTabBarViewController =
195+
storyboard?.instantiateViewController(
196+
withIdentifier: "tabMain") as? MainTabBarViewController
197+
else {
185198
return
186199
}
200+
187201
let sideViewController = SideMenuViewController()
188202

189203
let mainView = mainViewController.view!
190204
let sideView = sideViewController.view!
191205

206+
mainView.backgroundColor = .white
192207
mainView.translatesAutoresizingMaskIntoConstraints = false
193208
sideView.translatesAutoresizingMaskIntoConstraints = false
194209

195210
baseMainView.addSubview(mainView)
196211
mainView.leftAnchor.constraint(equalTo: baseMainView.leftAnchor).isActive = true
197-
mainView.topAnchor.constraint(equalTo: baseMainView.topAnchor).isActive = true
212+
mainView.topAnchor.constraint(
213+
equalTo: baseMainView.topAnchor,
214+
constant: 0).isActive = true
198215
mainView.rightAnchor.constraint(equalTo: baseMainView.rightAnchor).isActive = true
199216
mainView.bottomAnchor.constraint(equalTo: baseMainView.bottomAnchor).isActive = true
200217

@@ -214,7 +231,9 @@ class BaseSlidingViewController: UIViewController {
214231

215232
baseSideView.addSubview(sideView)
216233
sideView.leftAnchor.constraint(equalTo: baseSideView.leftAnchor).isActive = true
217-
sideView.topAnchor.constraint(equalTo: baseSideView.topAnchor).isActive = true
234+
sideView.topAnchor.constraint(
235+
equalTo: baseSideView.topAnchor,
236+
constant: 20).isActive = true
218237
sideView.rightAnchor.constraint(equalTo: baseSideView.rightAnchor).isActive = true
219238
sideView.bottomAnchor.constraint(equalTo: baseSideView.bottomAnchor).isActive = true
220239

0 commit comments

Comments
 (0)