Skip to content

Instantly share code, notes, and snippets.

@macbaszii
Created February 5, 2015 08:40
Show Gist options
  • Save macbaszii/040f86b68ca79feeb5ba to your computer and use it in GitHub Desktop.
Save macbaszii/040f86b68ca79feeb5ba to your computer and use it in GitHub Desktop.
for item in toolbarItems! {
if let barButtonItem = item as? UIBarButtonItem {
// Do something with UIBarButtonItem
}
if let segmentedControl = item as? UISegmentedControl {
// Do something with UISegmentedControl
}
}
for object in JSON as [NSDictionary] {
// Do something with JSON object
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment