diff --git a/RespectU.xcodeproj/project.pbxproj b/RespectU.xcodeproj/project.pbxproj index f6ffeac..542d7f9 100644 --- a/RespectU.xcodeproj/project.pbxproj +++ b/RespectU.xcodeproj/project.pbxproj @@ -210,7 +210,6 @@ 57A9D23286BDA314BEC501224189EFE7 /* TrophyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54A0585B9094D54EA2EE91A30C6265FA /* TrophyViewController.swift */; }; 8D428E252225AAE930BF8D945401F018 /* UIAlertController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42BE04F264C300B56C92EE575A854683 /* UIAlertController+.swift */; }; 86DEAB8A62F44038DA244F4B864FE1FF /* UIColor+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FC485CCFD9749EE1E561DFAE98EA11C /* UIColor+.swift */; }; - D5BAC3FE4BFE449319B1FF768BEA4DA9 /* UITableViewCell+.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BA4578D4298BF7ECAD291A9230D5DA /* UITableViewCell+.swift */; }; 5A7233F8CD55096485F6137E6278A377 /* UIView+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB6EB0A090B3EC667134B3DD24AA2A8 /* UIView+.swift */; }; 4CB993740AF398D71E90C9EC481F995D /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0933C1D68D4630ABCB0E824F3B06E6FA /* UIViewController+.swift */; }; C86374E3E25A9D8B40E03568CB353DCE /* Upload.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 808F49E6EA3E0B9F118A59BCD1C399A9 /* Upload.storyboard */; }; @@ -442,7 +441,6 @@ 54A0585B9094D54EA2EE91A30C6265FA /* TrophyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrophyViewController.swift; sourceTree = ""; }; 42BE04F264C300B56C92EE575A854683 /* UIAlertController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+.swift"; sourceTree = ""; }; 2FC485CCFD9749EE1E561DFAE98EA11C /* UIColor+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+.swift"; sourceTree = ""; }; - B0BA4578D4298BF7ECAD291A9230D5DA /* UITableViewCell+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableViewCell+.swift"; sourceTree = ""; }; 4DB6EB0A090B3EC667134B3DD24AA2A8 /* UIView+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+.swift"; sourceTree = ""; }; 0933C1D68D4630ABCB0E824F3B06E6FA /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = ""; }; 808F49E6EA3E0B9F118A59BCD1C399A9 /* Upload.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Upload.storyboard; sourceTree = ""; }; @@ -501,32 +499,6 @@ name = Frameworks; sourceTree = ""; }; - CA5641B4D07921D199A3C326E7E11880 /* XIBs */ = { - isa = PBXGroup; - children = ( - F957C9D0578879C4BFDF188CC7E9DB68 /* AchievementCell.xib */, - 4145F1EB5D7436740025D90996B48C6B /* GuideFirstCell.xib */, - ACAACBB2302A38B15286B2F10D57B0D2 /* GuideSecondCell.xib */, - 570419DC99D9A09F38A4AC7F521FCA9B /* GuideThirdCell.xib */, - 6F96CA2C329587E39822104CEF6C2C4D /* MissionCell.xib */, - 1BD862D1F9C81B97810DC117707740FB /* RankingCell.xib */, - CA9B676C5D60B5CCB2663B17DFB0D19B /* RecordCell.xib */, - A832024764FD1738185268E528614C3A /* RecordView.xib */, - 650873B493E00BDFE6552F230602E303 /* SearchByLevelView.xib */, - 65A74FCC87D5D9BBBEBAE0F47B7B68DA /* SearchByNoteView.xib */, - B6DD826AB9C764BFEA1BFE277466B01C /* SearchByRatingView.xib */, - E6C14F35B2B1A8D25A221C146D1C063B /* SearchRecordDetailCell.xib */, - 0A0189022C6BE4C949EA9505B6B3CA1C /* SkillLevelCell.xib */, - 62A4B18F7F37F18F820CB7408C91507F /* SkillLevelDetailView.xib */, - CDE48D134E382F52D49F7020BDAE3546 /* SongCell.xib */, - EDC63C6945BBA9A7159F95B906AC4F52 /* SummaryCell.xib */, - DBBD5EC70A4CB6A25BE54391F562C59F /* SummaryCollectionCell.xib */, - 1907607DB6FA22EE22397D314C25E2C6 /* Top50Cell.xib */, - F3C75B35A37617F2B6A9DD8208FE2AD9 /* TrophyCell.xib */, - ); - path = XIBs; - sourceTree = ""; - }; 20CD4E18015C56EA046398F6514DA8D4 /* Top50 */ = { isa = PBXGroup; children = ( @@ -672,7 +644,6 @@ 08640281899B112DEB6A0A0A56A169B7 /* String+.swift */, 42BE04F264C300B56C92EE575A854683 /* UIAlertController+.swift */, 2FC485CCFD9749EE1E561DFAE98EA11C /* UIColor+.swift */, - B0BA4578D4298BF7ECAD291A9230D5DA /* UITableViewCell+.swift */, 4DB6EB0A090B3EC667134B3DD24AA2A8 /* UIView+.swift */, 0933C1D68D4630ABCB0E824F3B06E6FA /* UIViewController+.swift */, ); @@ -826,6 +797,32 @@ path = Ranking; sourceTree = ""; }; + CA5641B4D07921D199A3C326E7E11880 /* XIBs */ = { + isa = PBXGroup; + children = ( + F957C9D0578879C4BFDF188CC7E9DB68 /* AchievementCell.xib */, + 4145F1EB5D7436740025D90996B48C6B /* GuideFirstCell.xib */, + ACAACBB2302A38B15286B2F10D57B0D2 /* GuideSecondCell.xib */, + 570419DC99D9A09F38A4AC7F521FCA9B /* GuideThirdCell.xib */, + 6F96CA2C329587E39822104CEF6C2C4D /* MissionCell.xib */, + 1BD862D1F9C81B97810DC117707740FB /* RankingCell.xib */, + CA9B676C5D60B5CCB2663B17DFB0D19B /* RecordCell.xib */, + A832024764FD1738185268E528614C3A /* RecordView.xib */, + 650873B493E00BDFE6552F230602E303 /* SearchByLevelView.xib */, + 65A74FCC87D5D9BBBEBAE0F47B7B68DA /* SearchByNoteView.xib */, + B6DD826AB9C764BFEA1BFE277466B01C /* SearchByRatingView.xib */, + E6C14F35B2B1A8D25A221C146D1C063B /* SearchRecordDetailCell.xib */, + 0A0189022C6BE4C949EA9505B6B3CA1C /* SkillLevelCell.xib */, + 62A4B18F7F37F18F820CB7408C91507F /* SkillLevelDetailView.xib */, + CDE48D134E382F52D49F7020BDAE3546 /* SongCell.xib */, + EDC63C6945BBA9A7159F95B906AC4F52 /* SummaryCell.xib */, + DBBD5EC70A4CB6A25BE54391F562C59F /* SummaryCollectionCell.xib */, + 1907607DB6FA22EE22397D314C25E2C6 /* Top50Cell.xib */, + F3C75B35A37617F2B6A9DD8208FE2AD9 /* TrophyCell.xib */, + ); + path = XIBs; + sourceTree = ""; + }; DC130C869CC4C032B6E7EDA0329E7A64 /* RespectU */ = { isa = PBXGroup; children = ( @@ -947,7 +944,7 @@ TargetAttributes = { 53800806E58C491F36E83AB35BB564AC = { CreatedOnToolsVersion = 9.0; - LastSwiftMigration = 0920; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; }; @@ -1258,7 +1255,6 @@ 57A9D23286BDA314BEC501224189EFE7 /* TrophyViewController.swift in Sources */, 8D428E252225AAE930BF8D945401F018 /* UIAlertController+.swift in Sources */, 86DEAB8A62F44038DA244F4B864FE1FF /* UIColor+.swift in Sources */, - D5BAC3FE4BFE449319B1FF768BEA4DA9 /* UITableViewCell+.swift in Sources */, 5A7233F8CD55096485F6137E6278A377 /* UIView+.swift in Sources */, 4CB993740AF398D71E90C9EC481F995D /* UIViewController+.swift in Sources */, 3C2E4343DB314444E72BCA528356A02B /* UploadViewController.swift in Sources */, @@ -1310,8 +1306,7 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -1333,8 +1328,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_PRECOMPILE_BRIDGING_HEADER = NO; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/RespectU.xcodeproj/xcuserdata/presto.xcuserdatad/xcschemes/RespectU.xcscheme b/RespectU.xcodeproj/xcuserdata/presto.xcuserdatad/xcschemes/RespectU.xcscheme index a63c84b..7efd948 100644 --- a/RespectU.xcodeproj/xcuserdata/presto.xcuserdatad/xcschemes/RespectU.xcscheme +++ b/RespectU.xcodeproj/xcuserdata/presto.xcuserdatad/xcschemes/RespectU.xcscheme @@ -1,6 +1,6 @@ @@ -42,7 +42,7 @@ @@ -65,7 +65,7 @@ runnableDebuggingMode = "0"> @@ -91,7 +91,7 @@ runnableDebuggingMode = "0"> diff --git a/RespectU/Sources/AppDelegate.swift b/RespectU/Sources/AppDelegate.swift index e9e965c..906b38a 100644 --- a/RespectU/Sources/AppDelegate.swift +++ b/RespectU/Sources/AppDelegate.swift @@ -1,6 +1,6 @@ // // AppDelegate.swift -// RespectU +// RespectU // // Created by Presto on 2017. 9. 26.. // Copyright © 2017년 Presto. All rights reserved. @@ -17,7 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { var config = Realm.Configuration() if let fileURL = config.fileURL { config.fileURL = fileURL.deletingLastPathComponent().appendingPathComponent("new.realm") diff --git a/RespectU/Sources/Common/AchievementType.swift b/RespectU/Sources/Common/AchievementType.swift index 9fc7916..70e4c3e 100644 --- a/RespectU/Sources/Common/AchievementType.swift +++ b/RespectU/Sources/Common/AchievementType.swift @@ -6,8 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation - /// The `enum` that defines types of achievement. enum AchievementType: String { diff --git a/RespectU/Sources/Common/Constants/SkillLevel.swift b/RespectU/Sources/Common/Constants/SkillLevel.swift index 33cccc5..fad523f 100644 --- a/RespectU/Sources/Common/Constants/SkillLevel.swift +++ b/RespectU/Sources/Common/Constants/SkillLevel.swift @@ -6,8 +6,6 @@ // Copyright © 2018년 Presto. All rights reserved. // -import Foundation - /// The `enum` that defines constants about skill level. enum SkillLevel: String, CaseIterable { @@ -93,10 +91,10 @@ enum SkillLevel: String, CaseIterable { case superstar1 = "SUPERSTAR Ⅰ" /// DJMAX GRAND MASTER. - case djmaxGrandMaster = "DJMAX GRAND MASTER" + case djmaxGrandMaster = "🔥DJMAX GRAND MASTER🔥" /// THE DJMAX. - case theDjmax = "✨THE DJMAX" + case theDjmax = "✨THE DJMAX✨" /// The skill levels of 4 button mode. static let button4SkillLevels: [SkillLevel] = [ diff --git a/RespectU/Sources/Common/Constants/SkillPoint.swift b/RespectU/Sources/Common/Constants/SkillPoint.swift index 5bab06c..4283a31 100644 --- a/RespectU/Sources/Common/Constants/SkillPoint.swift +++ b/RespectU/Sources/Common/Constants/SkillPoint.swift @@ -6,8 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation - /// The `enum` that defines constants about skill point. enum SkillPoint { diff --git a/RespectU/Sources/Common/Difficulty.swift b/RespectU/Sources/Common/Difficulty.swift index d620e89..1f02d9c 100644 --- a/RespectU/Sources/Common/Difficulty.swift +++ b/RespectU/Sources/Common/Difficulty.swift @@ -27,5 +27,6 @@ enum Difficulty: String { /// Only in mission - REDESIGN. case redesign + /// The all difficulties in normal mode. static let all: [Difficulty] = [.normal, .hard, .maximum] } diff --git a/RespectU/Sources/Common/GradientDirection.swift b/RespectU/Sources/Common/GradientDirection.swift index ad48654..504bfb4 100644 --- a/RespectU/Sources/Common/GradientDirection.swift +++ b/RespectU/Sources/Common/GradientDirection.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit /// The `enum` that defines a direction of gradient layer. diff --git a/RespectU/Sources/Common/MissionSection.swift b/RespectU/Sources/Common/MissionSection.swift index e9fc06f..7e64da5 100644 --- a/RespectU/Sources/Common/MissionSection.swift +++ b/RespectU/Sources/Common/MissionSection.swift @@ -8,10 +8,17 @@ import UIKit +/// The `protocol` that defines mission section type. protocol MissionSectionType { + /// The color representing each section. var color: UIColor? { get } + /// Makes gradient layer by `direction`. + /// + /// - Parameter direction: The direction of the gradient layer. + /// + /// - Returns: The created gradient layer. func makeGradient(by direction: GradientDirection) -> CAGradientLayer? } @@ -186,20 +193,6 @@ enum MissionSection { } } - case respect - - case trilogy - - case ce - - case technika1 - - case bs - - case technika2 - - case technika3 - static func makeSection(bySeries series: Series, section: String) -> MissionSectionType? { switch series { case .respect: @@ -212,6 +205,8 @@ enum MissionSection { return MissionSection.Technika1(rawValue: section) case .bs: return MissionSection.BS(rawValue: section) + case .linkdisk: + return MissionSection.LinkDisk(rawValue: section) case .technika2: return MissionSection.Technika2(rawValue: section) case .technika3: diff --git a/RespectU/Sources/Common/RUButton.swift b/RespectU/Sources/Common/RUButton.swift index 3557494..150b691 100644 --- a/RespectU/Sources/Common/RUButton.swift +++ b/RespectU/Sources/Common/RUButton.swift @@ -11,8 +11,6 @@ import UIKit /// The custom button used throughout the application. final class RUButton: UIButton { - // MARK: Initializer - override init(frame: CGRect) { super.init(frame: frame) configure() @@ -23,8 +21,6 @@ final class RUButton: UIButton { configure() } - // MARK: Method - /// Configures default settings. private func configure() { layer.cornerRadius = bounds.height / 2 diff --git a/RespectU/Sources/Common/SearchRecordDetail.swift b/RespectU/Sources/Common/SearchRecordDetail.swift index 93b8f89..5a3e688 100644 --- a/RespectU/Sources/Common/SearchRecordDetail.swift +++ b/RespectU/Sources/Common/SearchRecordDetail.swift @@ -6,8 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation - /// The `struct` using in search record detail. struct SearchRecordDetail { diff --git a/RespectU/Sources/Common/Series.swift b/RespectU/Sources/Common/Series.swift index a11af06..8881116 100644 --- a/RespectU/Sources/Common/Series.swift +++ b/RespectU/Sources/Common/Series.swift @@ -31,7 +31,7 @@ enum Series: String { case bs /// LINK DISK. - case linkDisk + case linkdisk /// TECHNIKA 2 DLC. case technika2 diff --git a/RespectU/Sources/Extension/CAGradientLayer+.swift b/RespectU/Sources/Extension/CAGradientLayer+.swift index 8a8b575..4057b02 100644 --- a/RespectU/Sources/Extension/CAGradientLayer+.swift +++ b/RespectU/Sources/Extension/CAGradientLayer+.swift @@ -10,27 +10,6 @@ import UIKit extension CAGradientLayer { - /// Creates gradient layer. - /// - /// - Parameters: - /// - startPoint: The start point of a gradient layer. - /// - endPoint: The end point of a gradient layer. - /// - colors: The colors of a gradient layer. - /// - locations: The locations of a gradient layer. - /// - /// - Returns: The gradient layer. -// static func make(startPoint: CGPoint, -// endPoint: CGPoint, -// colors: [CGColor], -// locations: [NSNumber]) -> CAGradientLayer { -// let gradient = CAGradientLayer() -// gradient.startPoint = startPoint -// gradient.endPoint = endPoint -// gradient.colors = colors -// gradient.locations = locations -// return gradient -// } - /// Initializes the gradient layer. /// /// - Parameters: diff --git a/RespectU/Sources/Extension/Double+.swift b/RespectU/Sources/Extension/Double+.swift index 504a164..d753f79 100644 --- a/RespectU/Sources/Extension/Double+.swift +++ b/RespectU/Sources/Extension/Double+.swift @@ -6,8 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation - extension Double { /// The natural constant. diff --git a/RespectU/Sources/Extension/MissionSection.BS+Gradient.swift b/RespectU/Sources/Extension/MissionSection.BS+Gradient.swift index e420cde..1920467 100644 --- a/RespectU/Sources/Extension/MissionSection.BS+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.BS+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.BS { diff --git a/RespectU/Sources/Extension/MissionSection.CE+Gradient.swift b/RespectU/Sources/Extension/MissionSection.CE+Gradient.swift index 682f790..8049f3e 100644 --- a/RespectU/Sources/Extension/MissionSection.CE+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.CE+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.CE { diff --git a/RespectU/Sources/Extension/MissionSection.LinkDisk+Gradient.swift b/RespectU/Sources/Extension/MissionSection.LinkDisk+Gradient.swift index 18de9a7..b56214c 100644 --- a/RespectU/Sources/Extension/MissionSection.LinkDisk+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.LinkDisk+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.LinkDisk { diff --git a/RespectU/Sources/Extension/MissionSection.Respect+Gradient.swift b/RespectU/Sources/Extension/MissionSection.Respect+Gradient.swift index 3d0a490..821955e 100644 --- a/RespectU/Sources/Extension/MissionSection.Respect+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.Respect+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.Respect { diff --git a/RespectU/Sources/Extension/MissionSection.Technika1+Gradient.swift b/RespectU/Sources/Extension/MissionSection.Technika1+Gradient.swift index 91e415e..f8d2b8a 100644 --- a/RespectU/Sources/Extension/MissionSection.Technika1+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.Technika1+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.Technika1 { diff --git a/RespectU/Sources/Extension/MissionSection.Technika2+Gradient.swift b/RespectU/Sources/Extension/MissionSection.Technika2+Gradient.swift index 205a138..d433aa7 100644 --- a/RespectU/Sources/Extension/MissionSection.Technika2+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.Technika2+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.Technika2 { diff --git a/RespectU/Sources/Extension/MissionSection.Technika3+Gradient.swift b/RespectU/Sources/Extension/MissionSection.Technika3+Gradient.swift index ae94ba5..585ba06 100644 --- a/RespectU/Sources/Extension/MissionSection.Technika3+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.Technika3+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.Technika3 { diff --git a/RespectU/Sources/Extension/MissionSection.Trilogy+Gradient.swift b/RespectU/Sources/Extension/MissionSection.Trilogy+Gradient.swift index 05adca0..922a267 100644 --- a/RespectU/Sources/Extension/MissionSection.Trilogy+Gradient.swift +++ b/RespectU/Sources/Extension/MissionSection.Trilogy+Gradient.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension MissionSection.Trilogy { diff --git a/RespectU/Sources/Extension/Series+UI.swift b/RespectU/Sources/Extension/Series+UI.swift index eca834d..24cb8de 100644 --- a/RespectU/Sources/Extension/Series+UI.swift +++ b/RespectU/Sources/Extension/Series+UI.swift @@ -6,7 +6,6 @@ // Copyright © 2019 Presto. All rights reserved. // -import Foundation import UIKit extension Series { @@ -32,7 +31,7 @@ extension Series { return Asset.technika2.color case .technika3: return Asset.technika3.color - case .linkDisk: + case .linkdisk: return nil } } @@ -88,7 +87,7 @@ extension Series { locations: [0, 0.2, 0.4, 0.6, 0.8, 1]) case .technika3: return nil - case .linkDisk: + case .linkdisk: return nil } } diff --git a/RespectU/Sources/Extension/UIColor+.swift b/RespectU/Sources/Extension/UIColor+.swift index c950c23..e01e042 100644 --- a/RespectU/Sources/Extension/UIColor+.swift +++ b/RespectU/Sources/Extension/UIColor+.swift @@ -13,126 +13,126 @@ extension UIColor { // MARK: App Color /// The main color of the application. - static let main: UIColor = Asset.main.color + static let main = Asset.main.color /// The sub color of the application. - static let sub: UIColor = Asset.sub.color + static let sub = Asset.sub.color /// The black color(RGB: 50). - static let black50: UIColor = Asset.black50.color + static let black50 = Asset.black50.color // MARK: Series Color /// The color representing RESPECT series. - static let respect: UIColor = Asset.respect.color + static let respect = Asset.respect.color /// The color representing PORTABLE 1 series. - static let portable1: UIColor = Asset.portable1.color + static let portable1 = Asset.portable1.color /// The color representing PORTABLE 2 series. - static let portable2: UIColor = Asset.portable2.color + static let portable2 = Asset.portable2.color /// The color representing TRILOGY series. - static let trilogy: UIColor = Asset.trilogy.color + static let trilogy = Asset.trilogy.color /// The color representing CLAZZIQUAI EDITION series. - static let ce: UIColor = Asset.ce.color + static let ce = Asset.ce.color /// The color representing TECHNIKA 1 series. - static let technika1: UIColor = Asset.technika1.color + static let technika1 = Asset.technika1.color /// The color representing BLACK SQUARE series. - static let bs: UIColor = Asset.bs.color + static let bs = Asset.bs.color /// The color representing TECHNIKA 2 series. - static let technika2: UIColor = Asset.technika2.color + static let technika2 = Asset.technika2.color /// The color representing TECHNIKA 3 series. - static let technika3: UIColor = Asset.technika3.color + static let technika3 = Asset.technika3.color // MARK: Mission Color /// The color representing Departure section in RESPECT series. - static let departure: UIColor = Asset.departure.color + static let departure = Asset.departure.color /// The color representing CLUB Road645 section in RESPECT series. - static let clubRoad645: UIColor = Asset.clubRoad645.color + static let clubRoad645 = Asset.clubRoad645.color /// The color representing MAX Theater section in RESPECT series. - static let maxTheater: UIColor = Asset.maxTheater.color + static let maxTheater = Asset.maxTheater.color /// The color representing Another WORLD section in RESPECT series. - static let anotherWorld: UIColor = Asset.anotherWorld.color + static let anotherWorld = Asset.anotherWorld.color /// The color representing Back STAGE section in RESPECT series. - static let backStage: UIColor = Asset.backStage.color + static let backStage = Asset.backStage.color /// The color representing Chaos theory section in RESPECT series. - static let chaosTheory: UIColor = Asset.chaosTheory.color + static let chaosTheory = Asset.chaosTheory.color /// The color representing Sound Lab section in RESPECT series. - static let soundLab: UIColor = Asset.soundLab.color + static let soundLab = Asset.soundLab.color /// The color representing Visualizer section in RESPECT series. - static let visualizer: UIColor = Asset.visualizer.color + static let visualizer = Asset.visualizer.color /// The color representing D-VELOPERS section in RESPECT series. - static let developers: UIColor = Asset.developers.color + static let developers = Asset.developers.color /// The color representing Destination section in RESPECT series. - static let destination: UIColor = Asset.destination.color + static let destination = Asset.destination.color /// The color representing T-SIDE section in TRILOGY series. - static let tSide: UIColor = Asset.tSide.color + static let tSide = Asset.tSide.color /// The color representing R-SIDE section in TRILOGY series. - static let rSide: UIColor = Asset.rSide.color + static let rSide = Asset.rSide.color /// The color representing Electronic City section in CLAZZIQUAI EDITION series. - static let electronicCity: UIColor = Asset.electronicCity.color + static let electronicCity = Asset.electronicCity.color /// The color representing Metropolis section in CLAZZIQUAI EDITION series. - static let metropolis: UIColor = Asset.metropolis.color + static let metropolis = Asset.metropolis.color /// The color representing Platinum Mixing section in TECHNIKA 1 series. - static let platinumMixing: UIColor = Asset.platinumMixing.color + static let platinumMixing = Asset.platinumMixing.color /// The color representing Technical Mixing section in TECHNIKA 1 series. - static let technicalMixing: UIColor = Asset.technicalMixing.color + static let technicalMixing = Asset.technicalMixing.color /// The color representing Stylish Performance section in BLACK SQUARE series. - static let stylishPerformance: UIColor = Asset.stylishPerformance.color + static let stylishPerformance = Asset.stylishPerformance.color /// The color representing Absolute Sound section in BLACK SQUARE series. - static let absoluteSound: UIColor = Asset.absoluteSound.color + static let absoluteSound = Asset.absoluteSound.color /// The color representing STAR MIXING section in TECHNIKA 2 series. - static let starMixing: UIColor = Asset.starMixing.color + static let starMixing = Asset.starMixing.color /// The color representing CLUB MIXING section in TECHNIKA 2 series. - static let clubMixing: UIColor = Asset.clubMixing.color + static let clubMixing = Asset.clubMixing.color /// The color representing WHITE DISK section in LINK DISK series. - static let whiteDisk: UIColor = Asset.whiteDisk.color + static let whiteDisk = Asset.whiteDisk.color /// The color representing BLACK DISK section in LINK DISK series. - static let blackDisk: UIColor = Asset.blackDisk.color + static let blackDisk = Asset.blackDisk.color - static let popMixing: UIColor = Asset.popMixing.color + static let popMixing = Asset.popMixing.color - static let crewChallenge: UIColor = Asset.crewChallenge.color + static let crewChallenge = Asset.crewChallenge.color // MARK: Trophy Color /// The color of PLATINUM trophy. - static let platinum: UIColor = Asset.platinum.color + static let platinum = Asset.platinum.color /// The color of GOLD trophy. - static let gold: UIColor = Asset.gold.color + static let gold = Asset.gold.color /// The color of SILVER trophy. - static let silver: UIColor = Asset.silver.color + static let silver = Asset.silver.color /// The color of BRONZE trophy. - static let bronze: UIColor = Asset.bronze.color + static let bronze = Asset.bronze.color } diff --git a/RespectU/Sources/Extension/UITableViewCell+.swift b/RespectU/Sources/Extension/UITableViewCell+.swift deleted file mode 100644 index 9fa4fa0..0000000 --- a/RespectU/Sources/Extension/UITableViewCell+.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// UITableViewCell+.swift -// RespectU -// -// Created by Presto on 2018. 8. 6.. -// Copyright © 2018년 Presto. All rights reserved. -// - -import UIKit - -extension UITableViewCell { - -// func setColorsInMission(_ series: String, labels: [UILabel]) { -// DispatchQueue.main.async { [unowned self] in -// switch series { -// case MissionSection.Respect.departure: -// self.contentView.backgroundColor = #colorLiteral(red: 0.3058823529, green: 0.9058823529, blue: 0.7450980392, alpha: 1) -// case MissionSection.Respect.clubRoad645: -// self.contentView.backgroundColor = #colorLiteral(red: 0.337254902, green: 0.8470588235, blue: 0.9568627451, alpha: 1) -// case MissionSection.Respect.maxTheater: -// self.contentView.backgroundColor = #colorLiteral(red: 0.3098039216, green: 0.6980392157, blue: 0.9098039216, alpha: 1) -// case MissionSection.Respect.anotherWorld: -// self.contentView.backgroundColor = #colorLiteral(red: 0.4431372549, green: 0.5882352941, blue: 0.8705882353, alpha: 1) -// case MissionSection.Respect.backStage: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7058823529, green: 0.6274509804, blue: 0.9215686275, alpha: 1) -// case MissionSection.Respect.chaosTheory: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7019607843, green: 0.5490196078, blue: 0.8980392157, alpha: 1) -// case MissionSection.Respect.soundLab: -// self.contentView.backgroundColor = #colorLiteral(red: 0.831372549, green: 0.4705882353, blue: 0.937254902, alpha: 1) -// case MissionSection.Respect.visualizer: -// self.contentView.backgroundColor = #colorLiteral(red: 0.8941176471, green: 0.4745098039, blue: 0.9019607843, alpha: 1) -// case MissionSection.Respect.developers: -// self.contentView.backgroundColor = #colorLiteral(red: 0.9607843137, green: 0.3333333333, blue: 0.6549019608, alpha: 1) -// case MissionSection.Respect.destination: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7960784314, green: 0.2862745098, blue: 0.3882352941, alpha: 1) -// case MissionSection.Trilogy.tSide: -// self.contentView.backgroundColor = #colorLiteral(red: 0.5607843137, green: 0.6784313725, blue: 0.831372549, alpha: 1) -// case MissionSection.Trilogy.rSide: -// self.contentView.backgroundColor = #colorLiteral(red: 0.662745098, green: 0.5803921569, blue: 0.8705882353, alpha: 1) -// case MissionSection.CE.electronicCity: -// self.contentView.backgroundColor = #colorLiteral(red: 0.8862745098, green: 0.8745098039, blue: 0.4431372549, alpha: 1) -// case MissionSection.CE.metropolis: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7137254902, green: 0.631372549, blue: 0.8039215686, alpha: 1) -// case MissionSection.Technika1.platinumMixing: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7137254902, green: 0.8196078431, blue: 0.8980392157, alpha: 1) -// case MissionSection.Technika1.technicalMixing: -// self.contentView.backgroundColor = #colorLiteral(red: 0.8901960784, green: 0.6, blue: 0.7803921569, alpha: 1) -// case MissionSection.BS.stylishPerformance: -// self.contentView.backgroundColor = #colorLiteral(red: 0.4980392157, green: 0.6274509804, blue: 0.8156862745, alpha: 1) -// case MissionSection.BS.absoluteSound: -// self.contentView.backgroundColor = #colorLiteral(red: 0.8039215686, green: 0.5019607843, blue: 0.6196078431, alpha: 1) -// case MissionSection.LinkDisk.whiteDisk: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7058823529, green: 0.431372549, blue: 0.4745098039, alpha: 1) -// case MissionSection.LinkDisk.blackDisk: -// self.contentView.backgroundColor = #colorLiteral(red: 0.6392156863, green: 0.6, blue: 0.4196078431, alpha: 1) -// case MissionSection.Technika2.starMixing: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7803921569, green: 0.6980392157, blue: 0.3647058824, alpha: 1) -// case MissionSection.Technika2.clubMixing: -// self.contentView.backgroundColor = #colorLiteral(red: 0.7803921569, green: 0.6980392157, blue: 0.3647058824, alpha: 1) -// default: -// self.contentView.backgroundColor = .clear -// } -// self.setColors(of: labels, to: .white) -// } -// } -// -// func unsetColors(labels: [UILabel]) { -// DispatchQueue.main.async { [weak self] in -// self?.contentView.backgroundColor = .white -// self?.setColors(of: labels, to: .black) -// } -// } -// -// private func setColors(of labels: [UILabel], to color: UIColor) { -// for label in labels { -// label.textColor = color -// } -// } -} diff --git a/RespectU/Sources/Models/Persistence.swift b/RespectU/Sources/Models/Persistence.swift index 0a4ef8e..162daab 100644 --- a/RespectU/Sources/Models/Persistence.swift +++ b/RespectU/Sources/Models/Persistence.swift @@ -8,8 +8,10 @@ import Foundation +/// The `struct` that defines user defaults persistence. struct Persistence { + /// The favorite button. static var favoriteButton: Button { get { let buttonString = UserDefaults.standard.string(forKey: "favoriteButton") ?? "" @@ -23,6 +25,7 @@ struct Persistence { } } + /// The nickname. static var nickname: String { get { return UserDefaults.standard.string(forKey: "nickname") ?? L10n.nicknameSetting @@ -35,6 +38,7 @@ struct Persistence { } } + /// The number of launching. static var numberOfLaunching: Int { get { return UserDefaults.standard.integer(forKey: "appOpenCount") @@ -47,6 +51,7 @@ struct Persistence { } } + /// The favorite bpm. static var bpm: Double { get { return UserDefaults.standard.double(forKey: "bpm") diff --git a/RespectU/Sources/Models/Realm/AchievementInfo.swift b/RespectU/Sources/Models/Realm/AchievementInfo.swift index 8ff05bd..2697636 100644 --- a/RespectU/Sources/Models/Realm/AchievementInfo.swift +++ b/RespectU/Sources/Models/Realm/AchievementInfo.swift @@ -77,7 +77,7 @@ final class AchievementInfo: Object { if case .all = type { return achievementInfo } else { - return achievementInfo.filter("type = \(type.rawValue)") + return achievementInfo.filter("type = '\(type.rawValue)'") } } diff --git a/RespectU/Sources/Models/Realm/MissionInfo.swift b/RespectU/Sources/Models/Realm/MissionInfo.swift index 5f29c92..e3e6fc4 100644 --- a/RespectU/Sources/Models/Realm/MissionInfo.swift +++ b/RespectU/Sources/Models/Realm/MissionInfo.swift @@ -167,7 +167,7 @@ final class MissionInfo: Object { let realm = try! Realm() let missionInfo = realm.objects(MissionInfo.self) if case let series? = series { - return missionInfo.filter("series = \(series.rawValue)") + return missionInfo.filter("series = '\(series.rawValue)'") } else { return missionInfo } diff --git a/RespectU/Sources/Models/Realm/MissionStageInfo.swift b/RespectU/Sources/Models/Realm/MissionStageInfo.swift index ec83555..871080a 100644 --- a/RespectU/Sources/Models/Realm/MissionStageInfo.swift +++ b/RespectU/Sources/Models/Realm/MissionStageInfo.swift @@ -29,6 +29,7 @@ final class MissionStageInfo: Object { } } + /// The `Difficulty` of the stage. var difficultyEnum: Difficulty? { return Difficulty(rawValue: difficulty) } diff --git a/RespectU/Sources/Models/Realm/RecordInfo.swift b/RespectU/Sources/Models/Realm/RecordInfo.swift index d4fa50c..6f29052 100644 --- a/RespectU/Sources/Models/Realm/RecordInfo.swift +++ b/RespectU/Sources/Models/Realm/RecordInfo.swift @@ -70,7 +70,7 @@ final class RecordInfo: Object { if title.isEmpty { return recordInfo } else { - return recordInfo.filter("title = \(title)") + return recordInfo.filter("title = '\(title)'") } } diff --git a/RespectU/Sources/Models/Realm/SongInfo.swift b/RespectU/Sources/Models/Realm/SongInfo.swift index 73b5f0a..42e8b96 100644 --- a/RespectU/Sources/Models/Realm/SongInfo.swift +++ b/RespectU/Sources/Models/Realm/SongInfo.swift @@ -132,7 +132,7 @@ final class SongInfo: Object { static func fetch(bySeries series: Series? = nil) -> Results { let songInfo = try! Realm().objects(SongInfo.self) if case let series? = series { - return songInfo.filter("series = \(series.rawValue)") + return songInfo.filter("series = '\(series.rawValue)'") } else { return songInfo } diff --git a/RespectU/Sources/Models/Realm/TipInfo.swift b/RespectU/Sources/Models/Realm/TipInfo.swift index 41b1488..959a7cc 100644 --- a/RespectU/Sources/Models/Realm/TipInfo.swift +++ b/RespectU/Sources/Models/Realm/TipInfo.swift @@ -51,7 +51,6 @@ final class TipInfo: Object { /// - Parameters: /// - object: The source tip information. /// - tipInfo: The updated tip information. - static func update(_ object: TipResponse.Tip, to tipInfo: TipInfo) { let realm = try! Realm() try! realm.write { diff --git a/RespectU/Sources/Models/Realm/TrophyInfo.swift b/RespectU/Sources/Models/Realm/TrophyInfo.swift index 052dd56..572c27a 100644 --- a/RespectU/Sources/Models/Realm/TrophyInfo.swift +++ b/RespectU/Sources/Models/Realm/TrophyInfo.swift @@ -98,7 +98,7 @@ final class TrophyInfo: Object { static func fetch(bySeries series: Series? = nil) -> Results { let trophyInfo = try! Realm().objects(TrophyInfo.self) if case let series? = series { - return trophyInfo.filter("series = \(series.rawValue)") + return trophyInfo.filter("series = '\(series.rawValue)'") } else { return trophyInfo } diff --git a/RespectU/Sources/Storyboards/Performance.storyboard b/RespectU/Sources/Storyboards/Performance.storyboard index 276304a..c6f2639 100644 --- a/RespectU/Sources/Storyboards/Performance.storyboard +++ b/RespectU/Sources/Storyboards/Performance.storyboard @@ -1,10 +1,6 @@ - - - - @@ -17,6 +13,7 @@ + @@ -32,11 +29,11 @@ - + - + - + @@ -65,7 +62,7 @@ - + - + - + - + @@ -382,7 +379,7 @@