自己開發的軟體或方法

  • warning: Creating default object from empty value in /home/xnvgu7/public_html/modules/taxonomy/taxonomy.pages.inc on line 34.
  • 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.
使用Xcode開發iPhone iPad軟體、或找到的使用方法

Swift & iOS8重要links

iOS8 Swift Cheat sheet:Swift/iOS8 的小抄。

Swift Cheat Sheet:Swift小抄。

iOS-blog:許多iOS8/Swift 教學。

Swift Tutorial - A quick start:快速上手Swift程式例子。

UISwitch在iOS7改變了大小

iOS7有許多改變,尤其是UI,UISwitch在iOS7改變了大小。

iOS7的UISwitch是51x31,而iOS7之前UISwitch是79x27,所以:

UISwitch的位置會有所改變,需要用程式來更改其位置。例如使用center來更改其位置:

pagingEnabled.center = CGPointMake( spacing + self.pagingEnabled.frame.size.width / 2, pagingEnabled.center.y);

 

 

Dev-C++顯示行號Line number

Dev-C++顯示行號Line number的方法是:

Dev-C++的求助Help

使用Dev-C++的求助Help,若出現「無法取得程式畫面」(如下圖),則需下載windows元件,windows7及windows8較會發生此情形。

在Xcode 5.0.1中,以iOS6測試

有了iOS7,必需將Xcode升級到Xcode 5,但是iOS simulator只有iOS7。若要測iOS6,該如何做?

Missing recommended icon file ,apps用到的圖形檔

做一個app需要許多圖形檔,現在把一定要的檔案詳列於下:

用Fireworks2004合成文字圖片

做app時常需一些圖檔,例如icon.png、Default.png,以下介紹用Fireworks2004合成文字圖片。

使用transitionFromViewController 轉換 UIPageViewController - 跳頁

 一般UIPageViewController 使用viewControllerBeforeViewController及viewControllerAfterViewController來轉換到上一頁或下一頁,但是若想跳頁的話,怎麼辦?使用transitionFromViewController。

Unbalanced calls to begin/end appearance transitions for <UIPageViewController:

 當手動來轉換至UIPageViewController時,若出現Unbalanced calls to begin/end appearance transitions for UIPageViewController:,這表示兩個UIPageViewController不當重疊。

解決方法:

找到這一行,並去掉這一行

Thread1:Program received signal:"SIGABRT"

Thread1:Program received signal:"SIGABRT"

這是由Xcode4.6.2產生的project,修改Deployment Target 5.0後,Product/Run在iPhone5.0 simulator或iPad5.0simulator時,所產生的錯誤。若Product/Run在iPhone5.0 simulator或iPad5.0simulator時,不會有問題。

Mac快速鍵

 以下是Mac經常可用到的快速鍵 :

直式中文in UIWebView(使用JavaScript)

在UIWebView中如果直式瀏覽中文?

使用JavaScript,在「webViewDidFinishLoad:」內加入:

如何用FileZilla來FTP檔案到伺服器Server?

 如何用FileZilla來FTP檔案到伺服器Server?

FileZilla

Download wwdr in Xcode 4.6.2

 在Xcode4.6.2 Download wwdr的方法:

過去在developer網頁中download wwdr很直覺,現在(2013-07-19)找不到了,所以從Xcode download

  1. 打開Xcode4.6.2
  2. Editor/Refresh from Developer Portal,做了這一步,所有的provision profile,Certificate(含wwdr)都會重新download至MAC

 download wwdr

 

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

即可

訂閱文章