Skip to content

Instantly share code, notes, and snippets.

View thiagoricieri's full-sized avatar
🇪🇪
In Tallinn

Thiago Ricieri thiagoricieri

🇪🇪
In Tallinn
View GitHub Profile
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
// Call this method somewhere in your view controller setup code.
- (void)registerForKeyboardNotifications
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWasShown:)
name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillBeHidden:)
name:UIKeyboardWillHideNotification object:nil];
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))
#pragma mark - NSFetchedResultsControllerDelegate Methods
- (NSFetchedResultsController *)fetchedResultsController {
if (__fetchedResultsController != nil) {
return __fetchedResultsController;
}
/*
Set up the fetched results controller.
*/
// Create the fetch request for the entity.
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
#import "NewCardViewController.h"
@interface NewCardViewController ()
@end
@implementation NewCardViewController
@thiagoricieri
thiagoricieri / MyViewController.m
Created July 26, 2012 19:15
Implementação de um View Controller com UITableView
//
// MyViewController.m
// Projeto
//
// Created by Thiago Ricieri on 24/07/12.
// Copyright (c) 2012. All rights reserved.
//
#import "MyViewController.h"