Skip to content

Instantly share code, notes, and snippets.

View hansemannn's full-sized avatar
🗺️

Hans Knöchel hansemannn

🗺️
View GitHub Profile
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var btn = Ti.UI.createButton({
title: "Schedule local notification!"
});
btn.addEventListener("click", scheduleLocalNotification);
function scheduleLocalNotification() {
var TiCropImageEditor = require('it.etnatraining.TiCIE');
var imageEditor = TiCropImageEditor.createImageEditor();
imageEditor.addEventListener("done", function(e) {
Ti.API.warn(e);
alert(e.image);
});
var win = Ti.UI.createWindow({
backgroundColor : "#fff"
@hansemannn
hansemannn / test.js
Created December 20, 2015 22:49
Ti.UI.iOS.PreviewContext with depending data
var window = Ti.UI.createWindow();
var context = Ti.UI.iOS.createPreviewContext({
contentHeight: 350,
preview: createPreview()
});
var table = Ti.UI.createTableView({
previewContext: context,
data: [{title: "Test 1", data: 1},{title: "Test 2", data: null}]
@hansemannn
hansemannn / TiUIiOSLivePhoto.swift
Last active January 12, 2016 13:29
Titanium Mobile proxies for PHLivePhoto's using Swift 2
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
import Foundation
import Photos

Hey there!

Thank you for the interest in contributing to Titanium Mobile. We are happy to review your code as soon as possible. To achieve this, please make sure to comply with the following guidelines:

  • Sign the CLA for open source contributions (only necessary for your first contribution)
  • Follow the instructions stated in "Contributing to Titanium"
  • If you are fixing an issue that already has a JIRA ticket, link the ticket inside your pull request
  • If you are fixing an issue that has no JIRA ticket, yet, create a new ticket and link it inside your pull request
var win = Ti.UI.createWindow();
var view1 = Ti.UI.createView({ backgroundColor:'#123' });
var view2 = Ti.UI.createView({ backgroundColor:'#246' });
var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
var view4 = Ti.UI.createView({ backgroundColor:'green' });
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var TiCircularSlider = require('de.marcelpociot.circularslider');
var sliderView = TiCircularSlider.createView({
top: 200,
left: 50,
height: 250,
width: 250,
var win = Ti.UI.createWindow();
var outterView = Ti.UI.createView({
width: 300,
height: 300,
backgroundColor: "red",
top: 40
});
var innerView = Ti.UI.createView({
var fs = require('fs'),
wrench = require('wrench'),
path = require('path'),
walk = require('walk');
exports.cliVersion = ">=5.0.6";
exports.init = function(logger, config, cli) {
var files = [];