昨天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 由iPad landscape 轉向 portrait時,不知為何UIWebView沒自動resize.
在做admob廣告時,橫向(Landscape)和直向(portrait)廣告大小不同,所以在進入viewDidLoad時需要知道是橫向或直向,但是一進viewDidLoad永遠是直向(portrait),用下方法測試可知:
使用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,用 statusBarOrientation, 例如:
Paginate html file in UIWebView 、 UIWebView分頁:2012-09-19星期三
安裝Android SDK,共需安裝Eclipse、Java Development Kit、Android SDK三項:
Mango即Windows Phone OS,是iOS、Android之後又一重要的移動平台作業系統,由微軟開發,開發Mango程式以C#(C Shop)語言為主。
Xcode4加快方法:2011年11月10日星期四
Xcode4很慢,尤其在舊Mac上(我的Mac mini是2GHz Intel Core 2 Duo,memory 1G DDR2、Bus 667Mhz),以下是三個加快方法(注意:先用Xcode4打開Xcode3的project或已用Xcode4產生了project):
重覆使用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間傳訊息:2011年05月10日星期二
有aClass及bClass,假設AClass會BClass *myBClass = [[BClass alloc] init];因此,可用myBClass去call任何BClass內method因而達到AClass傳訊息給BClass的目的。但是,如何在BClass內傳訊息給AClass呢?
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:2011年04月04日星期一
UIImage *myImage = [UIImage imageNamed:@"jesse.jpg"]; 竟然在device無法成功,但是用simulator卻OK。
tabbaritem的png無法顯示、是gray:2011年04月04日星期一
使用tabbarcontroller,需要更改tabbaritem上的image,一般都用.png檔,實作發現,許多.png檔無法顯示,呈現出來的是一片灰白-gray。
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