Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View paweljankowski's full-sized avatar

Paweł Jankowski paweljankowski

  • Wroclaw, Poland
View GitHub Profile
@paweljankowski
paweljankowski / swift_arrays.swift
Last active March 22, 2016 18:29
Swift arrays
import Foundation
protocol Foo: AnyObject { }
class Bar: Foo { }
let z = NSSet(array: [Bar(), Bar()])
let x = z.allObjects as? [Foo]
if x != nil {
print("Success")

Keybase proof

I hereby claim:

  • I am paweljankowski on github.
  • I am paweljankowski (https://keybase.io/paweljankowski) on keybase.
  • I have a public key whose fingerprint is 16BD 5BA7 CA93 D903 B88E C98A CC25 C3AE 7A20 C61C

To claim this, I am signing this object: