部落格

  • warning: Declaration of views_handler_argument::init(&$view, &$options) should be compatible with views_handler::init(&$view, $options) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • warning: Declaration of views_handler_filter::options_validate(&$form, &$form_state) should be compatible with views_handler::options_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter::options_submit(&$form, &$form_state) should be compatible with views_handler::options_submit($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter_boolean_operator::value_validate(&$form, &$form_state) should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 149.
  • warning: Declaration of views_plugin_style_default::options(&$options) should be compatible with views_object::options() in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 25.
  • warning: Declaration of views_plugin_row::options_validate($form, &$form_state) should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • warning: Declaration of views_plugin_row::options_submit($form, &$form_state) should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.

The executable 'the.app' is not a Position Independent Executable. Please ensure that your build settings are configure

昨天2013-07-17上傳後收到蘋果的一封信,重點如下: 

The executable 'ott.app' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.

在網上找了一下,有些解法,但不完全,試了多次,最終把問題解了,解法如下:

首先,我用Xcode4.6.2。

(A)先講答案:

UIWebView does not resize in iPad portrait

當UIWebView 由iPad  landscape 轉向 portrait時,不知為何UIWebView沒自動resize.

viewDidLoad always in portrait even iPad is in landscape, viewDidLoad永遠是以portrait mode開始

 在做admob廣告時,橫向(Landscape)和直向(portrait)廣告大小不同,所以在進入viewDidLoad時需要知道是橫向或直向,但是一進viewDidLoad永遠是直向(portrait),用下方法測試可知:

admob ipad landscape not work with error <Google> Invalid Request

使用admob時,在iPad landscape mode,當你看到 :

<Google> Invalid Request: {

    "drt_include" = 1;

    errors = "Ad size will not fit on screen";

    "google.afma.Notify_dt" = 1367802121417;

    "request_id" = 3;

    "request_scenario" = "offline_empty";

    type = admob;

    "use_webview_loadurl" = 0;

}

 

查iPhone iPad Orientation

查iPhone iPad Orientation,用 statusBarOrientation, 例如:

檢查memory leak

 在Xcode 4.6.2,

Product/profile

iOS/Memory/Leaks

點Leak

即可

Paginate html file in UIWebView 、 UIWebView分頁

Paginate html file in UIWebView 、 UIWebView分頁:2012-09-19星期三

Android程式開發重要連結

安裝Android SDK,共需安裝Eclipse、Java Development Kit、Android SDK三項:

第一個Windows Phone程式PhoneApp1

使用Windows7。

HTML5網頁設計重要連結

HTML5包含HTML5、css3、JavaScript ECMAScript 5。

Mango程式開發重要連結

Mango即Windows Phone OS,是iOS、Android之後又一重要的移動平台作業系統,由微軟開發,開發Mango程式以C#(C Shop)語言為主。

Xcode4加快方法

Xcode4加快方法:2011年11月10日星期四

Xcode4很慢,尤其在舊Mac上(我的Mac mini是2GHz Intel Core 2 Duo,memory 1G DDR2、Bus 667Mhz),以下是三個加快方法(注意:先用Xcode4打開Xcode3的project或已用Xcode4產生了project):

原始碼下載頁面

UIToolbar上顯示不出UILable

UIToolbar上顯示不出UILable:2011年05月09日星期一

重覆使用UIView、UIScrollView

重覆使用UIView、UIScrollView..:2011年05月09日星期一

當一頁一頁使用UIView、UIScrollView..時,不能一直allocation UIView,需使用已不需要的UIView。

作法:

每alloc一次UIView,給個tag,例如:myUIView.tag = 999;

其次,假設該UIView myUIView是myScrollView的subView,則以,reuseUIView = [myScrollView viewWithTag:999];找到這個view,來重覆使用。

 

 

class間傳訊息

class間傳訊息:2011年05月10日星期二

有aClass及bClass,假設AClass會BClass *myBClass = [[BClass alloc] init];因此,可用myBClass去call任何BClass內method因而達到AClass傳訊息給BClass的目的。但是,如何在BClass內傳訊息給AClass呢?

NSURL load不到search query

NSURL load不到search query:2011年04月04日星期一

設定search engine string,例如:http://www.google.com/search?q=query(query內為八卦), 用q=query語法後,[myWebView loadrequest:request];竟load不到search結果。

UIImage在device無法imageNamed

UIImage在device無法imageNamed:2011年04月04日星期一

UIImage *myImage = [UIImage imageNamed:@"jesse.jpg"]; 竟然在device無法成功,但是用simulator卻OK。

tabbaritem的png無法顯示、是gray

tabbaritem的png無法顯示、是gray:2011年04月04日星期一

使用tabbarcontroller,需要更改tabbaritem上的image,一般都用.png檔,實作發現,許多.png檔無法顯示,呈現出來的是一片灰白-gray。

Xcode3.2.6+iOS4.2無法上傳iPhone

Xcode3.2.6+iOS4.2無法上傳iPhone:2011年04月04日星期一

若最近下載了Xcode3.2.6,選了Device/Debug後想將程式上傳iPhone測試,卻不成功,而有以下message,可繼續讀本文。

Can’t install application

The Info.plist for application at /Users/admin/Desktop/abc/def/build/Debug-iphoneos/def.app specifies a minimum OS version of 4.3, which is too high to be installed on someiPhoneDevice

訂閱文章