Skip to content

Instantly share code, notes, and snippets.

📱
Swifting

Julian Caicedo juliancadi

📱
Swifting
Block or report user

Report or block juliancadi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@juliancadi
juliancadi / list.output
Last active Jan 8, 2019
'xcrun simctl list' && 'xcrun simctl —version' output
View list.output
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
@juliancadi
juliancadi / NiblessView.swift
Last active Dec 4, 2018
Nibless UIView in favor of initializer dependency injection.
View NiblessView.swift
import UIKit
open class NiblessView: UIView {
public override init(frame: CGRect) {
super.init(frame: frame)
}
@available(*, unavailable,
message: "Loading this view from a nib is unsupported in favor of initializer dependency injection."
@juliancadi
juliancadi / NiblessViewController.swift
Last active Dec 4, 2018
Nibless UIViewController in favor of initializer dependency injection.
View NiblessViewController.swift
import UIKit
open class NiblessViewController: UIViewController {
public init() {
super.init(nibName: nil, bundle: nil)
}
@available(*, unavailable,
message: "Loading this view controller from a nib is unsupported in favor of initializer dependency injection."
@juliancadi
juliancadi / SomeType.swift
Last active Sep 7, 2018
Sequence extension with class having generic types
View SomeType.swift
import Foundation
struct SomeType<T> {
let property: T
}
extension Sequence {
func doMagic<T>() -> [T] where Element == SomeType<T> {
return self.map { $0.property }
You can’t perform that action at this time.