Skip to content

Commit

Permalink
페이징 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lygon55555 committed Jun 18, 2022
1 parent 1cc3ed9 commit 97b9b1d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{
"pins" : [
{
"identity" : "panmodal",
"kind" : "remoteSourceControl",
"location" : "https://github.com/slackhq/PanModal.git",
"state" : {
"revision" : "b012aecb6b67a8e46369227f893c12544846613f",
"version" : "1.2.7"
}
},
{
"identity" : "snapkit",
"kind" : "remoteSourceControl",
Expand All @@ -17,15 +8,6 @@
"revision" : "f222cbdf325885926566172f6f5f06af95473158",
"version" : "5.6.0"
}
},
{
"identity" : "yds-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/yourssu/YDS-iOS",
"state" : {
"revision" : "52724f50193a20db78701843bfcd57fe40ab2e44",
"version" : "2.6.1"
}
}
],
"version" : 2
Expand Down
17 changes: 10 additions & 7 deletions Parchment/Classes/PagingOptions.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import UIKit
import YDS

public struct PagingOptions {
/// The size for each of the menu items. _Default:
Expand Down Expand Up @@ -86,7 +85,11 @@ public struct PagingOptions {
}
}

public init() {
public init(font: UIFont = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.medium),
selectedFont: UIFont = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.medium),
textColor: UIColor = UIColor.black,
selectedTextColor: UIColor = UIColor(red: 3 / 255, green: 125 / 255, blue: 233 / 255, alpha: 1),
indicatorColor: UIColor = UIColor(red: 3 / 255, green: 125 / 255, blue: 233 / 255, alpha: 1)) {
menuItemSize = .sizeToFit(minWidth: 150, height: 40)
menuInteraction = .scrolling
menuInsets = UIEdgeInsets.zero
Expand All @@ -103,15 +106,15 @@ public struct PagingOptions {
insets: UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
)

font = YDSFont.button2
selectedFont = YDSFont.button2
self.font = font
self.selectedFont = selectedFont

textColor = YDSColor.bottomBarNormal
selectedTextColor = YDSColor.bottomBarSelected
self.textColor = textColor
self.selectedTextColor = selectedTextColor
backgroundColor = .clear
selectedBackgroundColor = .clear
pagingContentBackgroundColor = .clear
menuBackgroundColor = .systemBackground
indicatorColor = YDSColor.bottomBarSelected
self.indicatorColor = indicatorColor
}
}
14 changes: 12 additions & 2 deletions Parchment/Classes/PagingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,18 @@ public class PagingViewController:

// MARK: Initializers

public init(type: TabBarType, viewControllers: [UIViewController]) {
var options: PagingOptions = PagingOptions()
public init(type: TabBarType,
viewControllers: [UIViewController],
font: UIFont,
selectedFont: UIFont,
textColor: UIColor,
selectedTextColor: UIColor,
indicatorColor: UIColor) {
var options: PagingOptions = PagingOptions(font: font,
selectedFont: selectedFont,
textColor: textColor,
selectedTextColor: selectedTextColor,
indicatorColor: indicatorColor)

switch type {
case .scrollable:
Expand Down

0 comments on commit 97b9b1d

Please sign in to comment.