This file contains hidden or 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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
This file contains hidden or 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 UIKit | |
import XCPlayground | |
let a = 10 | |
let layer = CAShapeLayer() | |
layer.strokeColor = UIColor.redColor().CGColor | |
layer.fillColor = UIColor(red: 1, green: 0.33, blue: 0.33, alpha: 1).CGColor | |
layer.lineWidth = 12 |
This file contains hidden or 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
class Foo2 { | |
let controller: UIViewController = Foo2.setupController() | |
let window: UIWindow = Foo2.setupWindow() | |
} | |
private extension Foo2 { | |
static func setupController() -> UIViewController { | |
return UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()! | |
} |
This file contains hidden or 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: - String | |
extension String { | |
func rangeOf(x: String) -> Range<Index>? { | |
return characters.rangeOf(x.characters) | |
} | |
} | |
extension String.CharacterView { |
This file contains hidden or 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 Foundation | |
class Playground : NSObject { | |
static var bundleVersion: String { | |
let s = self.description().stringByReplacingOccurrencesOfString(".Playground", withString:"") | |
return s | |
} | |
} | |
let version = Playground.bundleVersion |
This file contains hidden or 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
//: Playground - noun: a place where people can play | |
import UIKit | |
var remoteKeys = ["Play", "Stop"] | |
var LocalKyes = ["1", "2"] | |
/// Code 1 | |
var keys = [ |
This file contains hidden or 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 Dictionary { | |
init(_ elements: [Element]){ | |
self.init() | |
for (k, v) in elements { | |
self[k] = v | |
} | |
} | |
func map<U>(transform: Value -> U) -> [Key : U] { | |
return Dictionary<Key, U>(Swift.map(self, { (key, value) in (key, transform(value)) })) |
This file contains hidden or 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
func testFunc() { | |
for i in 0...100 { | |
let y = i * 10 | |
SpeedLog.print(y) | |
} | |
} | |
testFunc() |
This file contains hidden or 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
func testFunc() { | |
for i in 0...100 { | |
let y = i * 10 | |
#if DEBUG | |
print(y) | |
#endif | |
} | |
} | |
testFunc() |
This file contains hidden or 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
func testFunc() { | |
for i in 0...100 { | |
let y = i * 10 | |
print(y) | |
} | |
} | |
testFunc() |
NewerOlder