import RIBs
import RxSwift
import RxRelay
import ReactorKit
protocol FAQsRouting: ViewableRouting {
func routeToFAQ(_ faq: FAQ)
func detachFAQ()
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - DummyInteractor | |
final class DummyInteractor: | |
PresentableInteractor<DummyPresentable>, | |
DummyInteractable, | |
DummyPresentableListener | |
{ | |
private let dummyUseCase = DummyUseCase() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🌞 Morning 12 commits ▍░░░░░░░░░░░░░░░░░░░░ 2.0% | |
🌆 Daytime 99 commits ███▌░░░░░░░░░░░░░░░░░ 16.8% | |
🌃 Evening 269 commits █████████▌░░░░░░░░░░░ 45.5% | |
🌙 Night 211 commits ███████▍░░░░░░░░░░░░░ 35.7% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import instabot | |
class CustomBot: | |
def __init__(self): | |
self.bot = instabot.Bot() | |
self.bot.login(username='', password='', | |
use_cookie=False) | |
def test_like(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: | |
//: UIView Animation Syntax Sugar | |
//: | |
//: Created by Andyy Hope on 18/08/2016. | |
//: Twitter: @andyyhope | |
//: Medium: Andyy Hope, https://medium.com/@AndyyHope | |
import UIKit | |
extension UIView { |
If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).
You can do this in recent versions of Xcode by setting a configuration default.
From a terminal, just type this command and press Enter:
defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Rainist | |
// | |
// Created by Elon on 23/04/2019. | |
// Copyright © 2019 Elon. All rights reserved. | |
// | |
import UIKit | |
import RxSwift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum AppStoryboard: String { | |
case main = "Main" | |
} | |
extension UIViewController { | |
static func instantiate<T: UIViewController>(by storyboardName: AppStoryboard) -> T? { | |
let type = String(describing: T.Type.self) | |
guard let identifier = type.components(separatedBy: ".").first else { return nil } | |
let storyboard = UIStoryboard(name: storyboardName.rawValue, bundle: nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
/** | |
## bold | |
- Parameter size: 폰트 크기 | |
- Parameter color: 폰트 컬러 | |
*/ | |
func bold(size fontSize: CGFloat, color: UIColor? = nil) -> NSMutableAttributedString { | |
var attributes: [NSAttributedString.Key : Any] = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RealmSwift | |
import ObjectMapper | |
class ArrayTransform<T: RealmSwift.Object>: TransformType where T: Mappable { | |
typealias Object = List<T> | |
typealias JSON = Array<AnyObject> | |
/** | |
- Parameter value: JSON Value | |
- Returns: if value is `nil` or not Array will be return empty List<T> |