Copy git repositories with all history
"./" may be any subdirectory to copy
"./" may be any subdirectory to copy
Add Stop SOPA ribbon to your website
In iOS, the UIWebView component is composed of an inner UIScrollView and a web container. In older versions of iOS (4.3) the internal ScrollView is not visible, but we can access it.
Reset the zoom is a big question especially when you want to do programmatically. In my research I concluded that the best way is as follows:
MKMapKit:
Cocoa Touch Library included in iOS SDK. it provide some classes that interact with maps and geolocalization. the main class that we need is MKMapView, this class implements the Google Maps API natively.
Route-Me: (https://github.com/route-me/route-me)
Is an iOS Map Library, entirely open, and works with any map source.
I said ¿Offline?
MBTiles:
Is an offline map source spec, allow to store map information in a SQLite database. more information at: https://github.com/mapbox/mbtiles-spec
Route-Me and MBTiles together:
Since one month ago i started to develop over Titanium Mobile to build mobile applications more quickly, easy to share, and easy to coding. But many problems occurs when you have many iOS Sdks in your system. Basically when Titanium try to launch iphone simulator, it uses an binary called "iphonesim", this binary uses the "default" SDK directory: "/Developer". I deleted the Linker Flags at the project file to build without the strong reference.
You can use this tool well:
Where:
simulator_path is the path on you have installed the simulator (ex: "/Developer3.1/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/")
iphonesim is the path of this binary
You can use this binary and source from https://github.com/continuum/iphonesim
The application's source is written all in Javascript, CSS and HTML5. It's Great!! because you no need learn complex languages like Objective-C or C++.
how I start? http://developer.appcelerator.com/get_started
Titanium is Extensible, You can extend the framework adding your owns modules in objective-C or Java (android). http://developer.appcelerator.com/apidoc/mobile/latest/Titanium-module
Exists a lot of documentation: http://developer.appcelerator.com/doc/reference_guides
With Titanium you can taking advantage of Native Interfaces:
<script src="http://pastie.org/1342073.js"></script>
How is it Possible???
Titanium has a bridge, which translates the javascript code with the equivalent Objective-C - Java Code at runtime.
In Objective-C an "Protocol" define the behavior of a class, like a Java Interface.
How I do check if the object implements an interface (<protocolame>?
[object conformsToProtocol:protocolname>];
Check if the object is an instance of a class <classname>
[object isKindOfClass:@"classname"];
Check if the object implements a specific method <methodname>
[object respondToSelector:@selector(methodname)];
or
[object respondToSelector:@selector(methodname:)]; //method with parameters
Invoke a method <methodname> dynamically:
[object performSelector:@selector(methodname) withObject:anyobject afterDelay:seconds]
I developed an application that consume http response in JSON format. My goal is parse this JSON response and deserialize ein domains objects or array of domain objects. But it is simple when you know the response and the correspondient domain object to utilize, however when it is not known it's very dificult.
I built an fragment of code that use instrospection and parse an xml (configuration file) that contains the "Service Location", "Name of the domain Class", the "remote field" and the "local property".
The JSON Response:
<script src="http://pastie.org/1335180.js"></script>
The XML Configuration File
<script src="http://pastie.org/1335172.js"></script>
The Domain Class Menu.m
<script src="http://pastie.org/1335165.js"></script>The Code
<script src="http://pastie.org/1335169.js"></script>
Note:
* [serviceConfig objectForKey:@"key"] get the element at Configuration File.
* [responseBody JSONValue] get the JSON result (parsed into dictionary)
1. at the row 8 the sentence [[[NSClassFromString(outputClass) alloc] init] autorelease]; makes a instance of class (with name in outputClass string variable). This object, result, of type "id", is the domain object.
2. [result valueForKey:[output objectForKey:@"local"] get the class attribute "local", if not exist return nil.
3. The method isKindOfClass:[NSNumber class]] verify if the class of the local attribute "local" is NSNumber
4. [result setValue:[rawResult objectForKey:[output objectForKey:@"remote"]]
forKey:[output objectForKey:@"local"]]
it is the most important sentence. use the Key-Value feature of objective-C to assign dynamically a value to a Property.