Titanium mobile

1,643 views

Published on

JavaScriptでネイティブアプリをつくろう

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,643
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Titanium mobile

    1. 1. JavaScript
    2. 2. iPhone Objective-C#include <Foundation/NSObject.h>#include <stdio.h>@interface HelloWorld : NSObject- (void) hello;@end@implementation HelloWorld- (void) hello{ printf("Hello World.n");}@endint main(int argc, char **argv){ id obj = [HelloWorld alloc]; [obj hello]; return 0;}
    3. 3. Android Javapackage com.example.helloandroid;import android.app.Activity;import android.os.Bundle;public class HelloAndroid extends Activity {    /** Called when the activity is first created. */    @Override    public void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.main);    }}
    4. 4.
    5. 5. JavaScript
    6. 6. iPhone / Android
    7. 7. Titanium Mobile
    8. 8. Titanium JavaScriptTitanium.UI.setBackgroundColor(#000);console.log(‘hello world’);
    9. 9. var win1 = Titanium.UI.createWindow({ title:TextArea, backgroundColor:#fff, url: modules/editor.js});
    10. 10. var tabGroup = Titanium.UI.createTabGroup();var tab1 = Titanium.UI.createTab({ icon:KS_nav_views.png, title:Tab 1, window:win1});

    ×