Skip to content

Instantly share code, notes, and snippets.

---
layout: launch-post
title: "Favorite Swift Tips & Tricks of 2014"
subtitle: ""
excerpt: 'To celebrate the end of the year and the first 6 months of Swift, we asked ten of our Swift-est friends to share their favorite tips & tricks of 2014.'
tagline: "Favorite Swift Tips & Tricks of 2014"
tags: tips
ogType: Article
metaImage: "/assets/news/favorite-tips-cover.jpg"
---
[RLMRealm setSchemaVersion:1 forRealmAtPath:[RLMRealm defaultRealmPath] withMigrationBlock:^(RLMMigration *migration, NSUInteger oldSchemaVersion) {
if (oldSchemaVersion < 1) {
//
}
NSLog(@"Migration complete");
}];
//
// ViewController.m
// collection
//
// Created by Joseph Anderson on 8/11/14.
// Copyright (c) 2014 ifd. All rights reserved.
//
#import "ViewController.h"
#import "PhotoLibraryCell.h"
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSURL *referenceURL = info[UIImagePickerControllerReferenceURL];
//Initialize photo with referenceURL, get meta data etc
//[photo.location.latitude
//photo.location.longitude
//photo.venue
//photo.orientation
//
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library assetForURL:referenceURL resultBlock:^(ALAsset *asset) {