Skip to content

Commit

Permalink
Merge pull request #16 from presto95/develop
Browse files Browse the repository at this point in the history
3.02
  • Loading branch information
presto95 authored Mar 13, 2019
2 parents c3fa9a7 + e82f7b6 commit 2041042
Show file tree
Hide file tree
Showing 649 changed files with 16,937 additions and 11,973 deletions.
25 changes: 15 additions & 10 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
disabled_rules:
- line_length
- trailing_whitespace
- leading_whitespace
- force_try
- function_body_length
included:
- trailing_whitespace
- leading_whitespace
- force_try
- function_body_length
- large_tuple
- type_body_length

excluded:
- Pods
- RespectU/Supporting Files/ERProgressHud.swift
- Pods
- RespectU/Resources/SwiftGen

cyclomatic_complexity: 20

identifier_name:
excluded:
- id
Expand All @@ -24,9 +26,12 @@ identifier_name:
- a
- b
- c

type_name:
excluded:
- CE
- BS
trailing_space:


line_length:
warning: 99
error: 120
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

11 changes: 6 additions & 5 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
target 'RespectU' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'RealmSwift'
pod 'MarqueeLabel/Swift'
pod 'GaugeKit'
pod 'XLPagerTabStrip', '~>8.0'
pod 'DZNEmptyDataSet'
pod 'GaugeKit'
pod 'MarqueeLabel/Swift'
pod 'RealmSwift'
pod 'SVProgressHUD'
pod 'SwiftKeychainWrapper'
pod 'SwiftLint'
pod 'Then'
pod 'XLPagerTabStrip'
# Pods for RespectU

end
18 changes: 11 additions & 7 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ PODS:
- Realm/Headers (3.11.0)
- RealmSwift (3.11.0):
- Realm (= 3.11.0)
- SVProgressHUD (2.2.5)
- SwiftKeychainWrapper (3.0.1)
- SwiftLint (0.27.0)
- Then (2.4.0)
- XLPagerTabStrip (8.0.1)

DEPENDENCIES:
- DZNEmptyDataSet
- GaugeKit
- MarqueeLabel/Swift
- RealmSwift
- SVProgressHUD
- SwiftKeychainWrapper
- SwiftLint
- XLPagerTabStrip (~> 8.0)
- Then
- XLPagerTabStrip

SPEC REPOS:
https://github.com/cocoapods/specs.git:
Expand All @@ -27,8 +29,9 @@ SPEC REPOS:
- MarqueeLabel
- Realm
- RealmSwift
- SVProgressHUD
- SwiftKeychainWrapper
- SwiftLint
- Then
- XLPagerTabStrip

SPEC CHECKSUMS:
Expand All @@ -37,10 +40,11 @@ SPEC CHECKSUMS:
MarqueeLabel: 440a502b91a9179bd98f9fff00ba1150650a1c0e
Realm: 92f09a102692b96a9a10e9617f214f15c5ab85fc
RealmSwift: 5f0481cd658bb751c509314b964a35eaa264d2cf
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
SwiftKeychainWrapper: 38952a3636320ae61bad3513cadd870929de7a4a
SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073
Then: 71866660c7af35a7343831f7668e7cd2b62ee0f2
XLPagerTabStrip: c908b17cbf42fcd2598ee1adfc49bae25444d88a

PODFILE CHECKSUM: 967e17f81bf34e2b4bb2c7b9689c3016794bf520
PODFILE CHECKSUM: cf7fbafd9f5d2062e4d97c576509dfe6e37a5e23

COCOAPODS: 1.6.0.beta.1
COCOAPODS: 1.6.0
58 changes: 20 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# RespectU_iOS
![logo](./images/logo.png)
<img alt="RespectU" src="https://raw.github.com/presto95/RespectU/master/images/logo.png" style="max-width: 100%">

![Language](https://img.shields.io/badge/swift-4.2-orange.svg)
![Platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)
<p align="center"><img alt="Swift" src="https://img.shields.io/badge/swift-4.2-orange.svg"><img alt="Platform" src="https://img.shields.io/badge/platform-ios-lightgrey.svg"></p>

### RespectU : Guide for DJMAX RESPECT (iOS)
# RespectU : Guide for DJMAX RESPECT

국산 리듬게임 **[디제이맥스 리스펙트](https://www.djmaxrespect.com/#)** 의 가이드 애플리케이션
**국산 리듬게임 [디제이맥스 리스펙트](https://www.djmaxrespect.com/#) 의 가이드 애플리케이션**

---

Expand All @@ -18,19 +16,21 @@

### 사용한 라이브러리

[RealmSwift](https://cocoapods.org/pods/RealmSwift)
[DZNEmptyDataSet](https://github.com/dzenbot/DZNEmptyDataSet)

[SwiftKeychainWrapper](https://cocoapods.org/pods/SwiftKeychainWrapper)
[GaugeKit](https://github.com/skywinder/GaugeKit)

[SwiftLint](https://cocoapods.org/pods/SwiftLint)
[MarqueeLabel/Swift](https://github.com/cbpowell/MarqueeLabel)

[XLPagerTabStrip](https://cocoapods.org/pods/XLPagerTabStrip)
[RealmSwift](https://github.com/realm/realm-cocoa)

[GaugeKit](https://cocoapods.org/pods/GaugeKit)
[SVProgressHUD](https://github.com/SVProgressHUD/SVProgressHUD)

[DZNEmptyDataSet](https://cocoapods.org/pods/DZNEmptyDataSet)
[SwiftKeychainWrapper](https://github.com/jrendel/SwiftKeychainWrapper)

[MarqueeLabel/Swift](https://cocoapods.org/pods/MarqueeLabel)
[Then](https://github.com/devxoul/Then)

[XLPagerTabStrip](https://github.com/xmartlabs/XLPagerTabStrip)

---

Expand All @@ -52,32 +52,7 @@

#### SwiftLint를 통한 코드 스타일 및 컨벤션 강제

- 다양한 에러와 경고가 발생했고 빌드가 가능한 코드를 만드는 데만 해도 꽤 많은 시간이 걸렸다.
- 수정 과정을 통해서 사람들이 많이 사용하는 코딩 컨벤션을 알 수 있었고, 더 나은 코드로 수정할 수 있었다.
- 그 중 몇 개를 정리한다.
- `for_where`
- `for-in` 구문으로 컬렉션을 순회하면서 `if` 문으로 조건을 주어 작업을 처리하고 `break` 하는 코드가 있었는데, 이렇게 하기보다는 `where` 구문을 사용하여 더 나은 코드와 결과를 얻을 수 있었다.
- `function_parameter_count`
- 함수의 매개변수 개수는 5개 이하를 권장한다.
- 그 이상이 될 때는 구조체같은 것을 만들어서 보내주자.
- 어디서 매개변수 5개 까지는 레지스터에 저장되고 그 이상은 메모리에 저장되어서 속도 차가 난다고 들었던 것 같다. 이것 때문도 있겠지만 구조체 같은 것에 묶어서 보내주는 것이 여러모로 좋다.
- `void_return`
- `Void` 를 리턴하는 함수라면 `-> ()` 대신 `-> Void` 라고 작성하자.
- `unused_closure_parameter`
- 사용하지 않는 클로저 파라미터는 `_` 로 처리해주자.
- `notification_center_detachment`
- `deinit` 에서 옵저버를 제거하는 코드를 작성하자.
- `nesting`
- 응답 모델을 정의하는 곳에서 발생하였다. 중첩 타입의 뎁스를 두 개 이상으로 하는 것을 지양하자.
- `weak_delegate`
- 델리게이트 변수는 참조 순환을 피하기 위해 `weak` 로 선언되어야 한다.
- `class_delegate_protocol`
- 델리게이트를 위한 프로토콜을 클래스만 채택할 수 있게 해야 한다. 그래야 약한 참조가 가능하다.
- `weak_delegate` 와 함께 실용적인 팁을 얻은 부분이다.
- `mark`
- 마크 주석 관련. `// MARK: ` 또는 `// MARK: -` 과 같은 형식을 사용한다.
- `multiple_closure_with_trailing_closure`
- 한 개 이상의 클로저를 파라미터로 넘길 때 후행 클로저 문법 사용을 지양하자.

#### Memory Profiling

Expand Down Expand Up @@ -157,6 +132,13 @@

![8](./images/8.png)

**3.02**

- DJMAX RESPECT 1.21에 대응
- 전체 리팩토링
- 네이밍 등 코딩 스타일 관점
- 어떠한 기능의 올바른 위치 등 구조적 관점

**3.01**

- WKWebView를 SFSafariViewController로 교체
Expand Down
Loading

0 comments on commit 2041042

Please sign in to comment.