Open/Close Xcode console:
cmd+shift+y
Jump to definition, but in the assistant editor:
cmd+opt+click
Open/close navigators pane:
cmd+0
Open/close inspectors pane:
import UIKit | |
/// Protocol to be extended with implementations | |
protocol UIViewLoading {} | |
/// Extend UIView to declare that it includes nib loading functionality | |
extension UIView : UIViewLoading {} | |
/// Protocol implementation | |
extension UIViewLoading where Self : UIView { |
// | |
// ReusableView.swift | |
// Pods | |
// | |
// Created by Shahpour Benkau on 27/02/2017. | |
// | |
// | |
import UIKit |
/* | |
Copyright (C) 2016 Apple Inc. All Rights Reserved. | |
See LICENSE.txt for this sample’s licensing information | |
Abstract: | |
Provides a generic implementation of testing a value for value semantics. | |
*/ | |
import XCTest |
/* | |
Copyright © 01/10/2016 Shaps | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
Open/Close Xcode console:
cmd+shift+y
Jump to definition, but in the assistant editor:
cmd+opt+click
Open/close navigators pane:
cmd+0
Open/close inspectors pane:
// Swift 3 | |
extension DateFormatter { | |
public static var iso8601: DateFormatter { | |
return DateFormatter.iso8601DateFormatter | |
} | |
private static let iso8601DateFormatter: DateFormatter = { | |
let formatter = DateFormatter() | |
formatter.locale = Locale(identifier: "en_US_POSIX") |
// | |
// ViewController.swift | |
// Workspace | |
// | |
// Created by Shaps Benkau on 12/27/2016. | |
// Copyright (c) 2016 Snippex Ltd. All rights reserved. | |
// | |
import UIKit |
import Foundation | |
extension URLRequest { | |
/** | |
Returns a cURL command representation of this URL request. | |
*/ | |
public var curlString: String { | |
guard let url = url else { return "" } | |
var baseCommand = #"curl "\#(url.absoluteString)""# |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.698053 0.73105 0.720167 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>OperatorMono-Book - 13.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.847059 0.847059 0.376471 1</string> |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.698053 0.73105 0.720167 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>OperatorMono-Book - 13.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.847059 0.847059 0.376471 1</string> |