Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/#3-상세보기뷰
Browse files Browse the repository at this point in the history
  • Loading branch information
joonBaek12 committed Nov 24, 2022
2 parents aeb7ab2 + 1147232 commit 3bef2ab
Show file tree
Hide file tree
Showing 33 changed files with 1,184 additions and 40 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,5 @@ xcuserdata
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode,macos,swiftpackagemanager,swiftpm

*.xcuserstate
247 changes: 246 additions & 1 deletion Oliveyoung-iOS/Oliveyoung-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 @@ -9,26 +9,89 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>ReactiveSwift (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>ReactiveSwift (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>ReactiveSwift (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
</dict>
<key>Rx (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>Rx (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>Rx (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
<integer>3</integer>
</dict>
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
<integer>4</integer>
</dict>
<key>SnapKitPlayground (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
</dict>
</dict>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_0" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -11,15 +13,20 @@
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import Foundation
extension Const {

struct Identifier {

// static let TagCollectionViewCell = "TagCollectionViewCell"
static let RecentWordCollectionViewCell = "RecentWordCollectionViewCell"
static let PopularWordCollectionViewCell = "PopularWordCollectionViewCell"
static let SearchSectionView = "SearchSectionView"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//
// UIColor+.swift
// Oliveyoung-iOS
//
// Created by 양정연 on 2022/11/21.
//

import UIKit.UIColor

extension UIColor {

@nonobjc class var willaGrayGray500: UIColor {
return UIColor(white: 47.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray550: UIColor {
return UIColor(white: 68.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray400: UIColor {
return UIColor(white: 113.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray350: UIColor {
return UIColor(white: 142.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray300: UIColor {
return UIColor(white: 167.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray250: UIColor {
return UIColor(white: 194.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray200: UIColor {
return UIColor(white: 220.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray150: UIColor {
return UIColor(white: 235.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray100: UIColor {
return UIColor(white: 246.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaGrayGray000: UIColor {
return UIColor(white: 1.0, alpha: 1.0)
}

@nonobjc class var willaRedRed500: UIColor {
return UIColor(red: 239.0 / 255.0, green: 68.0 / 255.0, blue: 68.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaRedRed400: UIColor {
return UIColor(red: 248.0 / 255.0, green: 113.0 / 255.0, blue: 113.0 / 255.0, alpha: 1.0)
}

@nonobjc class var willaYellow: UIColor {
return UIColor(red: 1.0, green: 183.0 / 255.0, blue: 0.0, alpha: 1.0)
}

@nonobjc class var willa: UIColor {
return UIColor(red: 164.0 / 255.0, green: 210.0 / 255.0, blue: 50.0 / 255.0, alpha: 1.0)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,17 @@ extension UIView {
layer.borderColor = newValue.cgColor
}
}

public func makeRounded(radius: CGFloat) {

self.clipsToBounds = true
self.layer.cornerRadius = radius
}

public func makeColorRounded(_ radius: CGFloat, _ width: CGFloat, _ color: UIColor) {

self.makeRounded(radius: radius)
layer.borderWidth = width
layer.borderColor = color.cgColor
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// BaseView.swift
// Oliveyoung-iOS
//
// Created by 양정연 on 2022/11/24.
//

import UIKit

class BaseView: UIView {

override init(frame: CGRect) {
super.init(frame: frame)
setView()
setLayout()
}

@available(*, unavailable)
required init?(coder: NSCoder) {
super.init(coder: coder)
}

func setView() {}
func setLayout() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// BaseViewController.swift
// Oliveyoung-iOS
//
// Created by 양정연 on 2022/11/24.
//

import UIKit

class BaseViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

style()
}

override func viewWillAppear(_ animated: Bool) {

setNavigationBar()
}

func style() {
view.backgroundColor = .white
}

func setNavigationBar() {
navigationController?.setNavigationBarHidden(true, animated: true)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// PopularWordCollectionViewCell.swift
// Oliveyoung-iOS
//
// Created by 양정연 on 2022/11/24.
//

import UIKit

class PopularWordCollectionViewCell: UICollectionViewCell {
// MARK: - Component
private let searchWordLabel = UILabel().then {
$0.font = .bodyBody5
$0.textColor = .willaGrayGray500
$0.textAlignment = .center
}

// MARK: - Life Cycles
override init(frame: CGRect) {
super.init(frame: frame)

setUI()
setLayout()
}

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

override func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes {
super.preferredLayoutAttributesFitting(layoutAttributes)
layoutIfNeeded()
let size = contentView.systemLayoutSizeFitting(layoutAttributes.size)
var frame = layoutAttributes.frame
frame.size.width = ceil(size.width)
layoutAttributes.frame = frame
return layoutAttributes
}

// MARK: - Function
private func setUI() {
contentView.addSubview(searchWordLabel)
contentView.makeColorRounded(12, 1, .willa)
}

private func setLayout() {
contentView.addSubview(searchWordLabel)

searchWordLabel.snp.makeConstraints {
$0.centerX.centerY.equalToSuperview()
$0.height.equalTo(24)
}
}

func configureUI(word: Word) {
searchWordLabel.text = word.word
}
}
Loading

0 comments on commit 3bef2ab

Please sign in to comment.