Skip to content

Instantly share code, notes, and snippets.

@mattberg
mattberg / TiUIScrollableView.h
Created June 12, 2012 15:17
Adding scrollsToTop property for ScrollableView, allowing to disable it so a ScrollView can control the status bar event
-(void)manageRotation;
-(UIScrollView*)scrollview;
-(void)setCurrentPage_:(id)page;
-(void)setScrollingEnabled_:(id)enabled;
-(void)refreshScrollView:(CGRect)visibleBounds readd:(BOOL)readd;
-(void)setScrollsToTop_:(id)value; // New property added
@end
@mattberg
mattberg / Parse.js
Created September 21, 2012 14:24
Simple Parse REST API module for Titanium
var baseUrl = 'https://api.parse.com/1',
appId = 'XXXXXXXXXXXXXXX',
apiKey = 'XXXXXXXXXXXXXX'; // make sure to use the REST API Key
var _register = function(params, lambda, lambdaerror) {
var method = 'POST',
url = baseUrl + '/installations',
payload = (params) ? JSON.stringify(params) : '';
_helper(url, method, payload, function(data, status) {