I hereby claim:
- I am rpassis on github.
- I am rogerio (https://keybase.io/rogerio) on keybase.
- I have a public key whose fingerprint is 93B9 0AFB 0F54 4E95 B636 D6DB 5D85 65EB 0F79 CE6A
To claim this, I am signing this object:
import UIKit | |
private let reuseIdentifier = "Cell" | |
class CollectionViewController: UICollectionViewController { | |
/* Custom scrollView for paging */ | |
let pagingScrollView = UIScrollView() | |
/* Return item size */ |
struct Style<View: UIView> { | |
private let style: (View) -> Void | |
init(style: @escaping (View) -> Void) { | |
self.style = style | |
} | |
func apply(to view: View) { | |
style(view) | |
} |
import Foundation | |
import RxSwift | |
public class RxStore: StoreSubscriber { | |
private var stateObservable:Observable<AppState> { | |
return subject.asObserver() | |
.shareReplay(1) | |
} | |
private var subject = PublishSubject<AppState>() |
import Foundation | |
// Important: Ensure a DEBUG flag is set under OTHER SWIFT FLAGS (Debug environment only) | |
enum AppConfig: String { | |
case debug = "Debug" | |
case testFlight = "TestFlight" | |
case appStore = "Appstore" |
I hereby claim:
To claim this, I am signing this object:
// Since we are unable to extend ObjC protocols in swift, we wrap this around a custom NSObject subclass | |
// that deals exclusive with handling the image picker delegate methods and chaining the response down to | |
// the MediaPickerPresenter conforming delegate | |
class ImagePickerHandler: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | |
var delegate: MediaPickerPresenter? | |
let sourceType: UIImagePickerControllerSourceType | |
let picker = UIImagePickerController() | |
import UIKit | |
protocol KeyboardObservable { | |
var bottomSpaceToMainViewConstraint: NSLayoutConstraint! { get } | |
func subscribeToKeyboardNotifications() | |
} | |
extension KeyboardObservable where Self: UIViewController { | |
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
Pow install script enables the PF firewall and adds a rule to forward all port 80 traffic to the Pow server port. | |
Unfortunately, simply stopping the Pow server won't help as it doesn't stop PF. | |
Stop PF and use Docker for Mac: `sudo pfctl -d` | |
Start PF and use Pow: `sudo pfctl -e` |
export LC_ALL="en_US.UTF-8" | |
PODFILE=`find . -type f -name Podfile` | |
cd `dirname $PODFILE` | |
POD_PATH=`which pod` | |
$POD_PATH install |