git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # 1 | |
| post_install do |installer| | |
| installer.pods_project.targets.each do |target| | |
| target.build_configurations.each do |configuration| | |
| configuration.build_settings['SWIFT_VERSION'] = "4.0" | |
| end | |
| end | |
| end | |
| # 2 |
| public struct BoundedSequence<Base>: Sequence, IteratorProtocol where Base: Sequence { | |
| public struct Boundary: Equatable { | |
| public let isStart: Bool | |
| public let isEnd: Bool | |
| } | |
| private var _iterator: Base.Iterator | |
| private var _previous: Base.Element? | |
| private var _current: Base.Element? | |
| private var _next: Base.Element? |
| //: A UIKit based Playground for presenting user interface | |
| import UIKit | |
| import PlaygroundSupport | |
| extension Notification { | |
| struct UserInfoKey<ValueType>: Hashable { | |
| let key: String | |
| } | |
| extension UIScrollView { | |
| func scrollToTop() { | |
| if let selectorName = "X3Njcm9sbFRvVG9wSWZQb3NzaWJsZTo=".base64Decoded { | |
| let selector = NSSelectorFromString(selectorName) | |
| if responds(to: selector) { | |
| perform(selector, with: false) | |
| } | |
| } | |
| } |
| func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | |
| let text = collections[indexPath.row].name | |
| let width = UILabel.textWidth(font: titleFont, text: text) | |
| return CGSize(width: width + left + right, height: height) | |
| } |
| import UIKit | |
| import WebKit | |
| // Disableing `WKWebView` user zooming by returning `nil` in `UIScrollViewDelegate`'s | |
| // `viewForZooming` delegate method. | |
| // On iOS 12, the delegate method only called when set the web view itself as the | |
| // scroll view delegate. | |
| class WebView: WKWebView {} |
| // | |
| // Stack.swift | |
| // | |
| // Created by Derek on 18/12/19. | |
| // Copyright © 2019 DerekCoder. All rights reserved. | |
| // | |
| public struct Stack<Element> { | |
| private var storage: [Element] = [] | |
| // | |
| // LinkedList.swift | |
| // | |
| // Created by Derek on 20/12/19. | |
| // Copyright © 2019 DerekCoder. All rights reserved. | |
| // | |
| public class Node<Value> { | |
| public var value: Value |
| @font-face { | |
| font-family: "Creative Commons Symbols"; | |
| src: url(font_path("CreativeCommonsSymbols.woff2")) format("woff2"), | |
| url(font_path("CreativeCommonsSymbols.woff")) format("woff"); | |
| font-weight: normal; | |
| font-style: normal; | |
| unicode-range: U+1F10D-1F10F, U+1F16D-1F16F; | |
| } | |
| i { |