- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
Note: < i=OS 5.1 use
prefs:
. > 5.1 useapp-settings:
- app-settings:root=General&path=About
- app-settings:root=General&path=ACCESSIBILITY
- app-settings:root=AIRPLANE_MODE
- app-settings:root=General&path=AUTOLOCK
- app-settings:root=General&path=USAGE/CELLULAR_USAGE
- app-settings:root=Brightness
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 Array where Element: Equatable { | |
func exists(_ item: Element) -> Bool { | |
if let _ = self.indexOf(item) { | |
return true | |
} | |
return false | |
} | |
func indexOf(_ item: Element) -> Int? { |
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 { | |
func calcHeight(for width: CGFloat, font: UIFont) -> CGFloat { | |
let rect = CGSize(width: width, height: .greatestFiniteMagnitude) | |
let boundingRect = self.boundingRect(with: rect, options: .usesLineFragmentOrigin, attributes: [.font: font], context: nil) | |
return ceil(boundingRect.height) | |
} | |
func calcWidth(for height: CGFloat, font: UIFont) -> CGFloat { |
/*
Made by [egy.js](https://www.instagram.com/egy.js/);
*/
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
@discardableResult | |
func createView<T>(_ view: T, | |
parent: UIView?, | |
setting: ((T) -> ())? = nil, | |
constraint: ((ConstraintMaker) -> ())? = nil) -> T where T: UIView { | |
switch parent { | |
case let stack as UIStackView: | |
stack.addArrangedSubview(view) | |
case let collectionCell as UICollectionViewCell: |
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 RxSwift | |
import RxCocoa | |
extension Reactive where Base: UIViewController { | |
var viewWillAppear: ControlEvent<Void> { | |
let source = methodInvoked(#selector(Base.viewWillAppear)).map { _ in } | |
return ControlEvent(events: source) | |
} | |
var viewDidAppear: ControlEvent<Void> { | |
let source = methodInvoked(#selector(Base.viewDidAppear)).map { _ in } |
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
// | |
// Rx+Control.swift | |
// ReactiveSample | |
// | |
// Created by iamchiwon on 2018. 8. 1.. | |
// Copyright © 2018년 iamchiwon. 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
// | |
// ViewController.swift | |
// TableViewExample | |
// | |
// Created by iamchiwon on 2018. 8. 2.. | |
// Copyright © 2018년 ncode. 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
let screenSize = UIScreen.main.bounds.size | |
let screenWidth = screenSize.width | |
let screenHeight = screenSize.height | |
let statusHeight: CGFloat = { | |
guard #available(iOS 11.0, *), let window = UIApplication.shared.keyWindow else { | |
return 0 | |
} | |
return window.safeAreaInsets.top | |
}() |
OlderNewer