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
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:url options:nil]; | |
NSArray *keys = [NSArray arrayWithObject:@"playable"]; | |
//Carga los assets | |
[asset loadValuesAsynchronouslyForKeys:keys completionHandler:^() | |
{ | |
//Al terminar reproducelos en la cola principal | |
dispatch_async(dispatch_get_main_queue(), ^ | |
{ | |
AVPlayerItem *playerItem = [[[AVPlayerItem alloc] initWithAsset:asset] autorelease]; |
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 UnfoldSequence { | |
func toArray(filter : (UnfoldSequence.Iterator.Element) -> (Bool) ) -> [UnfoldSequence.Iterator.Element] { | |
var arreglo = Array<UnfoldSequence.Iterator.Element>() | |
for value in self { | |
if !filter(value) { break } | |
arreglo.append(value) | |
} | |
return arreglo | |
} | |
} |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
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
let tableViewA = UITableViewController() | |
let tableViewB = UITableViewController() | |
let viewController = UIViewController() | |
viewController.addChildViewController(tableViewA) | |
viewController.addChildViewController(tableViewB) | |
tableViewA.view.frame = CGRect(x: 0.0, y: 0.0, width: 300, height: 250) | |
tableViewB.view.frame = CGRect(x: 0.0, y: 250.0 , width: 300, height: 250) | |
viewController.view.frame = CGRect(x: 0.0, y: 0.0, width: 300, height: 500) |
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
# git | |
git init # Initialize git on the current folder | |
git checkout -b <new-branch-name> # Create a branch | |
git checkout <existing-branch> # Checkout a branch | |
git fetch --all # Get latest commits from origin | |
git add <file> # Add file to the stage area | |
git commit # Commit stages | |
git push origin <branch> # Push a branch to origin | |
git push origin <branch> --force # Force push a branch to origin |
NewerOlder