Skip to content

Instantly share code, notes, and snippets.

View nazrdogan's full-sized avatar
🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
View GitHub Profile
{
"fighters": [
{
"name": "Muhammad Ali",
"nickname": "The Greatest"
},
{
"name": "Chuck Liddell",
"nickname": "The Iceman"
},
@nazrdogan
nazrdogan / scrollview.js
Created April 12, 2014 16:43
Titanium Infinite scrollview
// ScrollView.js
function ScrollView(args){
var args = args || {};
var nearBottom = false;
var loadingView = Ti.UI.createView({
height:60,
width: Ti.UI.SIZE,
backgroundColor:"transparent",
visible:false
@nazrdogan
nazrdogan / navigation.js
Created April 27, 2014 12:42
Titanium Mobile Navigation ios
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win1 = Titanium.UI.iOS.createNavigationWindow({
window: win2
});
var win3 = Titanium.UI.createWindow({
@nazrdogan
nazrdogan / dragdrop.js
Created April 27, 2014 12:31
Drag and Drop Titanium Mobile
var Win=Ti.UI.createWindow({
backgroundColor:'white'
});
var circle = Titanium.UI.createView({
height:200,
width:200,
backgroundColor:'#336699',
top:10,
@nazrdogan
nazrdogan / navigationTable.js
Created April 28, 2014 13:46
Titanium Mobile Navigation and TableView
var win2 = Titanium.UI.createWindow({
backgroundColor: 'white',
title: 'Main'
});
var win1 = Titanium.UI.iOS.createNavigationWindow({
window: win2
});
@nazrdogan
nazrdogan / tableView.js
Created April 28, 2014 13:23
Titanium Mobile TableView
Ti.UI.setBackgroundColor('#000');
var win = Ti.UI.createWindow({
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false,
title: 'TableView Demo'
});
// generate random number, used to make each row appear distinct for this example
function randomInt(max){
@nazrdogan
nazrdogan / projeörnek
Created April 30, 2014 13:14
Titanium Radio
http://www.pastie.org/2303978#21,23
@nazrdogan
nazrdogan / editable.js
Created April 30, 2014 18:29
Titanium Mobile Editable Table View
Titanium.UI.setBackgroundColor('#000');
// TAB GRUBU OLUŞTUR
var tabGroup = Titanium.UI.createTabGroup();
// ANA WİNDOW OLUŞTURULUR BUNU HTML'DE BODY GİBİ DÜŞÜNEBİLİRİSNİZ
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var data = [
{title:'Window 2 Content 1'},
@nazrdogan
nazrdogan / app.js
Created May 1, 2014 08:37
Titanium TableView Edit -Finish and Trash option
var win = Ti.UI.createWindow({backgroundColor:'white', title:'SWIPEABLE CELL'})
var navWin = Ti.UI.iOS.createNavigationWindow({
window:win
})
function genWindow(module) {
var ListTest = require(module);
var win = new ListTest();
@nazrdogan
nazrdogan / eventListener.js
Created May 5, 2014 11:17
Titanium mobile Event Listener
// bad way
button.addEventListener('click', function (e) {
// something
});
// this is bad as removeEventListener needs to have
// the function originally used in creation passed back
// correct way
var handler = function (e) {
// something