Skip to content

Instantly share code, notes, and snippets.

View oliverbarreto's full-sized avatar

Oliver Barreto oliverbarreto

View GitHub Profile
// Eliminar elementos duplicados en un NSArray
NSArray *cleanedArray = [[NSSet setWithArray:dates] allObjects];
#import <UIKit/UIKit.h>
#define ApplicationDelegate ((QBKAppDelegate *)[UIApplication sharedApplication].delegate)
@interface QBKAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (copy, nonatomic) NSString* unaCadena;
@end
//http://mobiledevelopertips.com/core-services/create-universally-unique-identifier-uuid-the-ios-6-way.html
//The class NSUUID implements RFC 4122 creating values that are 128 bits long and guaranteed to be unique across space and time by using a unique value on the device as well as a value representing the elapsed time since October 15, 1582 at 00:00:00.
// iOS 6
NSUUID *uuid = [NSUUID UUID];
NSLog(@"UUID: %@", [uuid UUIDString]);
// Output: UUID: A84AFC3C-B3A7-31C7-B3E9-234AF423C6B1
// http://objective-c.es/modern-objective-c-enum/
// http://nshipster.com/ns_enum-ns_options/
typedef NS_ENUM(NSUInteger, GBDaysOfWeek) {
GBSunday,
GBMonday,
GBTuesday,
GBWednesday,
GBThursday,
GBFriday,
// Disable the idle timer
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
// Or for those who prefer dot syntax:
[UIApplication sharedApplication].idleTimerDisabled = YES;
#import <UIKit/UIKit.h>
#define ApplicationDelegate ((QBKAppDelegate *)[UIApplication sharedApplication].delegate)
@interface QBKAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (copy, nonatomic) NSString* unaCadena;
@end
//
// UIImageRounded.h
// BDD Restaurantes
//
// Created by Sendoa Portuondo on 03/10/11.
// Copyright 2011 Qbikode Solutions, S.L. All rights reserved.
//
#import <UIKit/UIKit.h>
@oliverbarreto
oliverbarreto / .gitignore & .gitattributes for Xcode Projects
Created December 8, 2013 11:00
.gitignore & .gitattributes for Xcode Projects (Thanks to @sendoa http://www.punteroavoid.com/blog/2013/07/12/iniciando-un-nuevo-proyecto-ios/) Excludes CocoaPods files !!!
// .gitignore
# OS X Finder
.DS_Store
# Xcode per-user config
*.mode1
*.mode1v3
*.mode2v3
*.perspective
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@oliverbarreto
oliverbarreto / Podfile Xcode iOS7.rb
Created December 8, 2013 21:27
Podfile Xcode iOS7 pod 'AFNetworking', '2.0.1' pod 'CocoaLumberjack', '1.6.2' pod 'TestFlightSDK', '1.3.0-beta.6' pod 'TestFlightLogger', '0.0.2'
platform :ios, "7.0"
target "MiProyecto" do
pod 'AFNetworking', '2.0.1'
pod 'CocoaLumberjack', '1.6.2'
pod 'TestFlightSDK', '1.3.0-beta.6'
pod 'TestFlightLogger', '0.0.2'
end
target "MiProyectoTests" do