This file contains 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
// at the top of the file | |
@interface TiApp() | |
- (void)checkBackgroundServices; | |
- (void)appBoot; | |
@property (atomic) NSMutableDictionary *responsesData; //here we are holding the responsesData, using their taskIdentifiers as keys | |
@end | |
// Here I initialise the property | |
- (void)appBoot | |
{ | |
kjsBridge = [[KrollBridge alloc] initWithHost:self]; |
This file contains 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
/** | |
* Ti.DynamicLib | |
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop. | |
* @version 1.0.0 | |
* | |
* Install: | |
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location. | |
* 2) Search and replace '<StripFrameworkScriptPath>' with the path to your strip-frameworks.sh file | |
The path is relative to the `build/iphone` directory. | |
* 3a) For classic modules: |
This file contains 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
/** | |
* Ti.DynamicLib | |
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop. | |
* @version 1.0.0 | |
* | |
* Install: | |
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location. | |
The path is relative to the `build/iphone` directory. | |
* 2a) For classic modules: | |
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)' |
This file contains 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
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
This file contains 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
// Allow syntax extensions | |
XRegExp.install("extensibility"); | |
/* Adds Unicode code point syntax to XRegExp: \u{n..} | |
* `n..` is any 1-6 digit hexadecimal number from 0-10FFFF. Comes from ES6 proposals. Code points | |
* above U+FFFF are converted to surrogate pairs, so e.g. `\u{20B20}` is simply an alternate syntax | |
* for `\uD842\uDF20`. This can lead to broken behavior if you follow a `\u{n..}` token that | |
* references a code point above U+FFFF with a quantifier, or if you use the same in a character | |
* class. Using `\u{n..}` with code points above U+FFFF is therefore not recommended, unless you | |
* know exactly what you're doing. XRegExp's handling follows ES6 proposals for `\u{n..}`, since |
This file contains 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 = Ti.UI.createWindow(); | |
var webView = Ti.UI.createWebView({ | |
url: 'http://www.youtube.com/embed/' + myVideoID + '?autoplay=1&autohide=1&cc_load_policy=0&color=white&controls=0&fs=0&iv_load_policy=3&modestbranding=1&rel=0&showinfo=0', | |
enableZoomControls: false, | |
scalesPageToFit: false, | |
scrollsToTop: false, | |
showScrollbars: false | |
}); |
This file contains 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 TiBounty={}; | |
TiBounty.UI={}; | |
TiBounty.renderList=function(tableView,atLarge){ | |
var rows =TiBounty.model.getFugitives(atLarge); | |
var data=[]; | |
while(rows.isValidRow()){ | |
var row = Ti.UI.createTableViewRow({title:rows.fieldByName('name'),sId:rows.fieldByName('id'), hasDetail:true}); | |
This file contains 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 TiBounty={}; | |
TiBounty.UI={}; | |
TiBounty.renderList=function(tableview){ | |
var rows =TiBounty.model.getFugitives(); | |
var data=[]; | |
var image; | |
var legend; | |
while(rows.isValidRow()){ | |
var row = Ti.UI.createTableViewRow({title:rows.fieldByName('name'),sId:rows.fieldByName('id'), hasDetail:true}); |