Titanium Mobile 2.0 対å¿ãªã©
Titanium Mobile ãã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ããã㦠SDK ã 1.8 ãã 2.0.1 ã«ãªãã¾ãããHBFav ã SDK 2.0.1 ã«å¯¾å¿ãããä½æ¥ãã²ã¨ã¾ãçµããã®ã§ã以ä¸éæãªã©ã
Titanium Mobile 2.0.1 ã§ä½ãå¤ãã£ãã
大ããªå¤æ´ç¹ã¯ã¬ã¤ã¢ã¦ãã·ã¹ãã ã®æ´æ°ã§ããå ãã¦ããããã¨ãã°ãã£ãã¯ã¹ãã»ãã«ã Appcelerator Cloud Services (ACS) ã¨ãã BaaS é£æºãçºè¡¨ããã¦ãã¾ãããç´ç²ã« SDK ã®ã¢ãããã¼ãã¨ããã¨ã¬ã¤ã¢ã¦ãã·ã¹ãã ã¨ãã°ä¿®æ£ã主ãªã¨ãããAndoridä½ç½®æ å ±å¯¾å¿ã®å¼·åãModule API ã®ã¢ãããã¼ããããã¾ããããã®è¾ºã¯ iOS ã®éçºã«ãã使ã£ã¦ããªãèªåçã«ã¯ãã¾ãé¢ä¿ãªãã
å
æ¥æ±äº¬ã§éããããã¼ã³ãã¤ãã³ãã«åå ãããæ¹ã
ãè¦ç¹ãã¾ã¨ãã¦ãã ãã£ã¦ããã®ã§ããã詳ããã¯ä»¥ä¸ã®URLãè¦ã¦ãã ããã
ã¬ã¤ã¢ã¦ãã·ã¹ãã ã®æ´æ°
ãã®ã¬ã¤ã¢ã¦ãã·ã¹ãã ã®æ´æ°ãå¾æ¹äºææ§ã¨ãã観ç¹ã§ã¯ã¡ãã£ã¨ããã¢ãããã¼ãã§ãããã¾ã§ View ã®æ¨ªå¹ ãç¸¦å¹ ã "auto" ã§æå®ãã¦ãããã®ããã®ã¾ã¾ã ã¨æå¾ ããéãã«åä½ããªããªãããã®ããã Ti.UI.SIZE 㨠Ti.UI.FILL ã¨ããäºã¤ã®å®æ°ãæ示çã«ä½¿ãåãã¦æå®ããªããã¨ããããããã¨ã«ãªãã¾ãããè¦ããã«ãå¾æ¹äºææ§ããªããªã£ãã
ãªããããªå¤æ´ãå ããããæåã¯ããã©ã¼ãã³ã¹åä¸ã®ããã¨ããããªé¢¨ã«èãã¦ããã®ã§ããå®éã«ã¯ãiOS 㨠Android éã®ã¯ãã¹ãã©ãããã©ã¼ã æ§ãåä¸ãããããã¨ããã®ã主ç¼ã ã£ã模æ§ã§ãããã¶ãããªãã§ãæ£ç´ãªã¨ãã iOS ã¢ããªã®ã¿ã«ä½¿ã£ã¦ããèªåã®ãããªéçºè ã«ã¯ãã¾ãç´æ¥çãªã¡ãªããã«ã¯ãªãã¾ããã
å ·ä½çã«ã©ãä¿®æ£ããã¹ããã¯
ã®ããã¥ã¡ã³ãã«è©³ããæ¸ããã¦ãã¾ããæå¾ã®æ®µè½ "Migrating Applications to Release 2.0" ã«åãã¼ã¸ã§ã³ã¨åãåãã«ãããã£ãã
- "auto" ãæå®ãã¦ãã width / height ã«ã¯ Ti.UI.SIZE ãæå®ãã
- "auto" ãä½ãæå®ãã¦ããªãã£ã width / height 㧠(2positions pins ãå®ç¾©ãã¦ãªãã¨ãã) 㯠Ti.UI.FILL ãæå®ãã
㧠ok ã¨ããããã«ãåºæ¬çã«ã¯ãã®2æ¹éã§å®è£ ãããèªåã®ã¢ããªãåºæ¬çã«ã¯ããã§ã»ã¼ãã¾ãåããã®ã§ãããããã§ãç¸å¤ããã WARNING ãæ¶ããªãã®ã¨ã微調æ´ãå¿ è¦ã ã£ãã¨ããã¯ããããããã¾ããã
ãã¨ã¯ãã¾ã æªè§£æ±ºãªãã§ãããTi.UI.SIZE ãªã©ã§ã·ã¹ãã å´ã« height ãè¨ç®ãããå ´åã«ãæåã®æãè¿ããæ¨ªå¹ ããããã¾ã§å°éãã¦ãã¾ã£ãå ´åãªã©ã«ç¸¦å¹ ã®è¨ç®ããã¾ããã£ã¦ãªãã±ã¼ã¹ãããããã§ããèªåã®ã³ã¼ãã®æ¸ãæ¹ãæªãã®ãã©ããã¯ã£ããã¨ã¯å¤æãã¤ããªãããã©ããè²ã 試ãã¦ãæ²»ããªãã®ã§ããããè¨ç®å¦çã®ãã°ãä½ãã§ã¯ãªããã
ãããªé¢¨ã«ãéä¸è¦ããªãã¹ãã¼ã¹ã空ãã¦ãã¾ã£ãã
éã« TableViewRow ã®é«ãã足ããªãã¦æåãè¦åãã¦ãã¾ã£ããããã( teppeisããã«ä»æã¯ããã¾ãã(ç¬) )
çµå± Titanium Mobile 2.0 ã¨ã¯ï½¥ï½¥ï½¥
ãããã¦è¦ã¦ã¿ãã¨ã1.8 â 2.0 ã¨ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ãã! ã¨ã¯è¨ããã®ã®ãå®éã«ã¯ã¬ã¤ã¢ã¦ãã·ã¹ãã ã®å¾æ¹äºææ§ã失ããããæ ã«ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ããã¨ãããããªå°è±¡ãåãã¦ãã¾ããªãã§ããªãã§ããããã°ä¿®æ£ã¯å¬ããããã©ã
ACS ã使ã£ã¦åãã¦ã2.0 ã®ãã¼ã¸ã§ã³ã¢ããã®æ©æµãå¾ããããããããã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ãããªã®ããããã¾ããã
ã¯ãã¹ãã©ãããã©ã¼ã ã«é¢ã㦠â ã¤ãã§ã«Titanium Mobile éæ
ã¬ã¤ã¢ã¦ãã·ã¹ãã ã®æ´æ°ã¯ãiOS 㨠Android ã§ã®ãã©ãããã©ã¼ã ä¾åãªå¦çãå¶å¾¡ããããããããã«è¡ãããå¤æ´ã§ãããããããTitanium Mobile ãã¯ãã¹ãã©ãããã©ã¼ã ããªãã¹ãã²ã¨ã¤ã®ã³ã¼ããããã¯åãããæ¹ã§ iOS/Android 両対å¿ã®ã¢ããªãéçºã§ãããã¨ãæ¨ãã¦ãã¦ããããã®ã ã¨ãã姿å¢ã伺ãã¾ãã
å人çã«ã¯ããã®ã¢ããã¼ãã«é¢ãã¦æãã¨ãããããã¾ãã
åããã¬ã¼ã ã¯ã¼ã¯ãè¨èªã§ iOS/Android ã®ã¢ããªã©ã¡ããä½ãããã¨ããã¨ããã¾ã§ã¯è¯ãã§ããã§ããã¯ã³ã½ã¼ã¹ã§ä¸¡è ã®ã¢ããªãä½ããã¨ããã®ã¯ããããç¡çãããã®ã¯ãã¾ãããããããã¼ãªãã¿ããªè¯ãç¥ã£ã¦ããã
iOS 㨠Android ã¯åãã¹ãã¼ããã©ã³OSã§ãã©ã¡ããä¸è¦ä¼¼ããããªã«ã㯠& ãã£ã¼ã«ãæã£ã¦ãããããªã¨ãããããã®ã§ããã¤ã¦ã® Webéçºã«ãããã¯ãã¹ãã©ã¦ã¶å¯¾å¿ã®ããã«ã¨ããããä¸ã¤ä½ã£ã¦ããã° OK ã¨ããã®ã¯é åçã«è¦ãããããããªé¢¨ã«ã§ããã®ã§ã¯ãªããã¨æã£ã¦ãã¾ãã®ã¯ä»æ¹ããªãã
Facebook ãããã¸ã§ã¯ãã¹ãã«ã¿ã³ã§ãããã¾ã§ãã«ãã¤ãã£ãã¢ããªã¨ãã¦éçºããã¦ããåãã©ãããã©ã¼ã ã®ã¢ããªããEmbedded Web Views çãªã¢ã¼ããã¯ã㣠â PhoneGap ã Sencha Touch ãç®æããããªããã¤ãã£ãã¢ããªã®ä¸ã® WebView ããªãã¡HTML5ã§ã¢ããªãä½ããããã«ãã¦ããã¤ãã£ãã³ã¼ãã¯ããªãã¸ãã¦å¼ã³åºããAPIãæä¾ãã â ã«ããã®ããè¤æ°ã®ã¢ããªã®éçºã®æéæããéããããããã㯠Web ã®ããã«ãã¤ãããã¯ã«ã³ã³ãã³ããæ´æ°ãããã¨ããæå³ããã§ãããã以åã¯ãä¸ã¤æ©è½ã追å ãããã³ã«7ã¤ã®ãã©ãããã©ã¼ã ã®ã³ã¼ãããªãªã¼ã¹ããªããã°ãããªããã¨åãã¦ããããã§ãããã
ãããã§ããããã®ä¸è¦ä¼¼ããããªã«ã㯠& ãã£ã¼ã«ã® iOS 㨠Android ã¯ãUI ã®ã¢ã¼ããã¯ãã£ããå²ã¨æ ¹æ¬çãªã¨ããã§å·®ç°ãããã¾ããAndroid éçºã¯ã»ã¨ãã©çµé¨ããªãã«çããã®ã§å ·ä½çã«ããéãã¨è«ãããã¨ãã§ããã»ã©ã«ã¯ç解ã§ãã¦ãã¾ããããããã²ã¼ã·ã§ã³ã®ããæ¹ãä¾ãã° iOS 㯠UINavigationController ã使ã£ã¦ã¢ããªå é¨ã§æ°ããã¦ã£ã³ãã¦ãçæãã¦å¦çãããã¤ã¾ãã¦ã£ã³ãã¦ãå¯çµåãããå½¢ã§ä½ãã®ã«å¯¾ããAndroid ã¯ã·ã¹ãã çã«ã¯ç㪠View ãçæãã¦ä¸¡è ãåã«ç»é¢é·ç§»ä¸ã¤ãªãã£ã¦ãã¨ã¿ãªããè¦ã¯ã¹ãã¼ãã¬ã¹ãª Web ã®ãããªèãæ¹ã®ã¢ã¼ããã¯ãã£ã«ãªã£ã¦ããã¨ããè¤æ°ã®é ç®ãé¸æããããããã¯ãã°ã«ã¹ã¤ããã® UI ã®èãæ¹ãéãã°ããã¿ã³ã®å·¦å³ã®é ç½®ããªã·ã¼ãéãã¨ããçµæ§éãããã§ãã
ãã®è¾ºãå®ã¯ãªãã£ã·ã£ã«ã®ãã¶ã¤ã³ã¬ã¤ãã©ã¤ã³ã«ãã°ãæ¸ãã¦ããã
Most developers want to distribute their apps on multiple platforms. As you plan your app for Android, keep in mind that different platforms play by different rules and conventions. Design decisions that make perfect sense on one platform will look and feel misplaced in the context of a different platform. While a "design once, ship anywhere" approach might save you time up-front, you run the very real risk of creating inconsistent apps that alienate users. Consider the following guidelines to avoid the most common traps and pitfalls.
ãAndroid çãã¯ã³ã½ã¼ã¹ã§åãã«ã㯠& ãã£ã¼ã«ã«ãã¦ãã¨ããæ¹éã¯ããããã¢ã³ããã¿ã¼ã³ãªã®ã 諸å! ã¨ãããã¨ã§ãã
Appcelerator çã« "Cross Platform" ã¨æ示çã«è¨ã£ã¦ããã©ããã¯ãè¨ã£ã¦ããããªè¨ã£ã¦ãªããããªææ§ãªã¨ããã¯ããã¾ãããããããã®UIã¢ã¼ããã¯ãã£ã®ç°ãªãäºã¤ã®ã·ã¹ãã ãçµ±åãããã¨ããã®ã¯çãæªãã¨å人çã«ã¯æãã®ã§ããã¾ããã£ã¡æ¹é¢ã«åãå ¥ããã®ã§ã¯ãªããããã¾ã§ iOS ã Android ã®ã¢ããªãããã¤ãã£ããããããããæ軽ã«ä½ããã¨ãããã¨ã«ãã©ã¼ã«ã¹ãã¦æ¬²ãããªã¨ã¯æãã¾ããéãã¨ããã¯éã£ã¦ã¦ãããã©ããã¯ã³ã½ã¼ã¹ã§ã¢ããªä½ã£ããããªãããã
iOS ã® UIKit 㯠"UIKit Framework" ã¨ããååãæãããã«ããããã®ãã®ããã¬ã¼ã ã¯ã¼ã¯ã§ããããã¬ã¼ã ã¯ã¼ã¯ãããã«ãã¬ã¼ã ã¯ã¼ã¯ã§æ½è±¡åãããã㪠Titanium Mobile ã®ãããªã¢ããã¼ãã¯ãã¾ãã¡ã¨ããè¦æ¹ãããæ¹ãããããã§ããã¾ã確ãã«è¨ããã¦ã¿ãã°ãç´æçã«ã¯æ£ããæ°ãããããã ãå®è£ ä¸ã®é½åé£ãããã¨ã¯ãã£ã¦ä¹ãè¶ããããªãå£ãåºã¦ãããã¨ã¯ãããããããªãããã©ããTitanium ã§ã¤ãã³ãããªãã³ãª JavaScript ã§ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ãæ¸ããã¨ããã®ã¯ã使ã£ã¦ã¿ãã¨é常ã«æã«é¦´æããæªããªããã§ãããå°ãªãã¨ããã¦ã¼ã¹ã±ã¼ã¹ã¬ãã«ã§ã®æ½è±¡åã¨ããæå³ã§ã¯ééã£ãæ¹åæ§ã§ã¯ãªãã¨æããç¹°ãè¿ãã«ãªãã¾ãããå®è£ ã¬ãã«ã§ãããã©ããã¯å¥ã¨ãã¦ã
ãã®ã³ã¢é¨åãè¯ãã§ãã¦ãããã¤ã¾ã Objective-C ãã¤ãã£ãããã§æ¸ããã®ã¨éè²ãªããããªåºæ¥ã®ãã®ãä½ããããã§ããã°ããã®æã®å¦çç³»ã«ã¯æªæ¥ããããªãã¨èªåã¯æãã¾ãã
ç¾ç¶ã¯ãã¾ã (ããã¾ã§èªåãææ³ãè¿°ã¹ãããã®ã¯ iOS ã«é¢ãã¦ã®ã¿ã§ããã©) ãã¥ã¢ãã¤ãã£ãã¨æ¯è¼ããå ´åã«ã¯ç´°ããã¨ããã§å°ãéããè¦ã¤ãããããã»ã©ç®ç«ã¤ããã§ã¯ãªãããã©ãä¾ãã° TableView ã® Row ãé¸æãã¦æ°ããã¦ã£ã³ãã¦ãéãæã®ãã©ã¼ã«ã¹ãããã¤ãã£ãã®å ´åã¯æ»ã£ã¦ããã¾ã§ãã©ã¼ã«ã¹ããã¦ããã®ã«ãTitanium ã§ä½ãã¨ãã®ãã©ã¼ã«ã¹ãå¤ãã¦ãã¾ã£ã¦ããã¨ããã¡ãã£ã¨ããåãã§ç»é¢ããã©ã¤ã (ããã¯èªåãã·ã³ã°ã«ã³ã³ããã¹ãã¢ãã«ã§éçºãã¦ããªããããããããªã) ã¨ãããããªãã¨ããããããã®ãã¥ã¼ãã³ã°å¦ä½ããä»å¾ã® Titanium Mobile ã§é·ãã¢ããªãéçºãã¦ããããã©ããã®åããç®ã§ã¯ãªããã¨æãã¾ãã
é度ã«é¢ãã¦ã¯ãiPhone 3GS ã®ã¨ãã¯ç¹ã« TableView åãã®é度ããããã¨ããããããã®ããã£ã¦ãããããã¤ãã£ãã§æ¸ãç´ããªãã¨é§ç®ããªã¨æã£ã¦ãããã®ã® 4S ã«ãããã»ã¨ãã©æ°ã«ãªããªããªã£ããInstruments ã§è¦ã¦ãåæ ¼ã©ã¤ã³ã§ããã¨ããã® 40 ã 60FPS ã¯åºããä»å¹´ä¸ã« iPhone 5 ã¯åºãã¨ãã話ã ãä»å¾ãã¹ãã¼ããã©ã³ã®æ§è½ã¯ã ã¼ã¢ã®æ³åçã«ä¸æãã¦ããã®ã¯ééããªããã¨ããããããããä»è¨ç®æ©çéã®ããã³ãã£ã¢ã§ããã®ã§ãããã¯ããããç¨åº¦éãç´ã£ã¦ãã¾ã£ã¦ãè¯ãé åããªã®ãããããªãã§ããã
ãã®ã»ãããã
2.0.1 ã«ãªãã¾ããããä¾ã«ãã£ã¦ build ãã£ã¬ã¯ããªå ã«çæããã Objective-C ã®ã³ã¼ãã«å°ãããããå½ã¦ã¦ä½¿ã£ã¦ãã¾ãã
å¤æ´ç¹ã¨ãã¦ã¯
- UILabel ã®èæ¯ã®ééå¦çããªãã㦠Instruments ã§è¦ãæã® Blended Layer ãæ¶ããããã« (TiUILabel.m)
- WebView ã®èæ¯ã®ééå¦çããªããã¦åæ (TiUIWebView.m)
- ç»åã®ä½è¨ãªãªãµã¤ãºå¦çãã¹ããããã¦ããªãµã¤ãºæã®ãªãã¹ã¯ãªã¼ã³ã¬ã³ããªã³ã°ãçºçããªãããã« (UIImage+Resize.m)
- 2.0.1 ã® WebView ã®ãã¼ãã£ã³ã°ã¤ã³ã¸ã±ã¼ã¿ã¯ãã°ããã (å·¦ä¸é ã£ãã«è¡¨ç¤ºããã¦è¦åãã¦ãã) ã®ã§ãã¤ã³ã¸ã±ã¼ã¿ã表示ããªã㧠js å´ã§èªåã§ç¨æããããã« (TiUIWebView.m)
ã¨ãã4ç¹ã§ãã
ãã¨ãèªå㯠Titanium Studio ã¯ä½¿ã£ã¦ããã TiDev Community ã使ã£ã¦ãã«ããã¦ã¾ãããã¡ã SDK 2.0.1 ã§ãåé¡ãªã使ãã¾ããã
ã¾ã¨ã
ãã¡ããã¡ãã¨è絡ãªãæ¸ãã¾ãããè¦ããã«ãTitanium Mobile ã«ã¯æå¾ ãã¦ãã¾ãããã¾ã æ¬å½ã«æ¬æ ¼çãªã¢ããªãä½ãã®ã«ã¯è¥å¹²æãå±ããã¨ããã¨ãããªã®ã§ä¸ã®äººã«ã¯æ¯éã¨ãããã°ã£ã¦æ¬²ãããªãã¨æã£ã¦ããã¨ããããããã¨ã§ããä¸ããç®ç·ã§ãã¿ã¾ãããå¿æ´ãã¦ãã¾ãã