Skip to content

Instantly share code, notes, and snippets.

View rscarvalho's full-sized avatar

Rodolfo Carvalho rscarvalho

View GitHub Profile
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"showPost"]) {
NSDictionary *current = self.posts[[self.tableView indexPathForSelectedRow].row];
WPPostViewController *vc = segue.destinationViewController;
vc.postText = current[@"content"];
vc.postTitle = current[@"title"];
}
}
pod "SVPullToRefresh", "0.4"
#import "UIScrollView+SVPullToRefresh.h"
__block id this = self;
[self.tableView addPullToRefreshWithActionHandler:^{
// Escreva seu codigo aqui
// Depois de executar a logica, envie uma mensagem para o componente encerrar a atualização
[[this tableView].pullToRefreshView stopAnimating];
}];
#import "UIScrollView+SVInfiniteScrolling.h"
__block id this = self;
[self.tableView addInfiniteScrollingWithActionHandler:^{
// Logica de negocio
// ...
// Pare a animacao do componente
[[this tableView].infiniteScrollingView stopAnimating];
}];
def getch():
is_windows = True
try:
import msvcrt
def g_windows():
return msvcrt.getch()
impl = g_windows
except ImportError:
print "\n".join(["Ja sei programar em python!" for i in range(10)])
@rscarvalho
rscarvalho / .vimrc
Last active August 29, 2015 14:04
OpenProject
let g:OpenProject#folder_prefix = $HOME . "/code/"
let g:OpenProject#projects = {
\"lengio": "lengio/lengio-app",
\"parser": "lengio/parser"
\}
" Open a specific project with a command (e.g. :Lengio<CR>)
command! Lengio OpenProject lengio
filetype off
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
call vundle#end()
filetype plugin indent on