Created
September 1, 2016 13:16
-
-
Save myell0w/b057e5d8c065040855083848834142d9 to your computer and use it in GitHub Desktop.
NSMutableArray -> [TypedArray]
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 allNodesWithoutSorting() -> [MNCNode] { | |
let allNodes = NSMutableArray(object: self.mainNode) | |
self.addAll(subnodesOfNode: self.mainNode, toArray: allNodes) | |
// trick the compiler… | |
return (allNodes as AnyObject as? [MNCNode]) ?? [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment