Skip to content

Instantly share code, notes, and snippets.

View artanisdesign's full-sized avatar

Gergely Cziva artanisdesign

View GitHub Profile
@artanisdesign
artanisdesign / TiUIWindowProxy.m
Created December 25, 2013 22:31
in iOS7, with Titanium, if you set rightNavButton or leftNavButton, with a custom button or view.. etc, it has extra spacing on the left or right side, which is really annoying, if you want the button snap to the edge. here is a small hack, if you need the view positioned to the left or right side correctly.
//from line 502
-(void)setRightNavButton:(id)proxy withObject:(id)properties
{
ENSURE_UI_THREAD_WITH_OBJ(setRightNavButton,proxy,properties);
if (properties == nil) {
properties = [self valueForKey:@"rightNavSettings"];
}
else {
[self setValue:properties forKey:@"rightNavSettings"];
@artanisdesign
artanisdesign / .jshintrc
Last active July 8, 2016 20:04
Titanium JSHint setup
{
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"indent": 4,
"unused": true,
"onevar": true,
"undef": true,
"trailing": true,
"latedef": true,
@artanisdesign
artanisdesign / jshint_setup.md
Last active December 1, 2015 15:58
Install and setup JSHint Plugin in Titanium / Appcelerator Studio
function showgallery(){
Titanium.Media.openPhotoGallery({
success:function(event){
var cropRect = event.cropRect;
var image = event.media;
Ti.API.debug('Our type was: '+event.mediaType);
if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO){
var uri = image.nativePath;
@artanisdesign
artanisdesign / node.sh
Last active August 29, 2015 14:11 — forked from adamcbrewer/node.sh
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
@artanisdesign
artanisdesign / jshint
Last active August 29, 2015 14:21
jshint
{
"bitwise": true,
"camelcase": true,
"eqeqeq": true,
"indent": 4,
"unused": true,
"onevar": true,
"undef": true,
"trailing": true,
"latedef": true,