This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import View from 'view'; | |
import Window from 'window'; | |
// Example Usage | |
let win = new Window(); | |
let view = new View({ | |
top: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Titanium.UI.createWindow({ | |
backgroundColor:'grey' | |
}); | |
Ti.Geolocation.preferredProvider = "gps"; | |
Ti.Geolocation.purpose = "GPS demo"; | |
Ti.Geolocation.trackSignificantLocationChange = true; | |
Ti.Geolocation.setAllowBackgroundLocationUpdates(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IPop3Client : IDisposable { | |
void Connect(); | |
List<string> GetMessageUids(); | |
MessageHeader GetMessageHeaders(int messageNumber); | |
Message GetMessage(int messageNumber); | |
IEnumerable<Message> FetchMessagesLike(string emailedToRegex); | |
IEnumerable<Message> FetchMessagesFrom(string[] to); | |
void DeleteMessage(int messageNumber); | |
void DeleteMessages(IList<Message> messages); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set selectedDevices to choose from list {"iPhone", "iPhone (Retina 3.5-inch)", "iPhone (Retina 4-inch)", "iPad", "iPad (Retina)"} with prompt "Choose device type:" default items {"iPhone"} without multiple selections allowed | |
if selectedDevices is not false then | |
set selectedDevice to item 1 of selectedDevices as string | |
set thePListFolderPath to path to preferences folder from user domain as string | |
set thePListPath to thePListFolderPath & "com.apple.iphonesimulator.plist" | |
tell application "System Events" | |
tell property list file thePListPath | |
tell contents | |
set value of property list item "SimulateDevice" to selectedDevice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* I made this code for an upcoming hackaton, so, it's really, really ugly. Feel free | |
* to update it here so everyone will be able to use it correctly. | |
* | |
* It's pretty easy to understand, basicly the object you want to edit, an overlay, | |
* four handlers, and the background view. | |
* | |
* It's currently made for/tested on iPad 5.0 with Timob 2.0.2; works only in landscape. | |
* | |
* This code is under the Moustach licence. This means you can do whatever you want with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! Socket.IO.js build:0.9.6, development. Copyright(c) 2011 LearnBoost <[email protected]> MIT Licensed */ | |
/** | |
* Originally Ported to titanium by Jordi Domenech <[email protected]> | |
* source: https://github.com/iamyellow/socket.io-client | |
*/ | |
this.io = {}; | |
module.exports = this.io; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this file located in /Library/Application Support/Titanium/mobilesdk/osx/{version_number} | |
// add the following methods to GeolocationModule.mm | |
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region | |
{ | |
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:NUMBOOL(YES),@"success",[NSDictionary dictionaryWithObjectsAndKeys:NUMDOUBLE(region.center.latitude),@"lat",NUMDOUBLE(region.center.longitude),@"lng",NUMDOUBLE(region.radius),@"radius",region.identifier,@"identifier",nil],@"region",nil]; | |
if ([self _hasListeners:@"enteredRegion"]) | |
{ | |
[self fireEvent:@"enteredRegion" withObject:event]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a hack solves the "Invalid method passed to UIModule" error | |
* It works by forcing Titanium to load SDK components into memory. | |
* | |
* Drop this file anywhere in your project and DON'T Ti.include() it. | |
* Be sure this file extension is .js. | |
* Clean and recompile your project. | |
* | |
* Enjoy! | |
* @tzmartin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* | |
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> |
NewerOlder