2014年6月4日 星期三

UIPageViewController easy sample code

重新整理一下這篇教學文件的code , 並且改成純 hot coding 版 (原文是使用 single view application + xib) How to Use UIPageViewController to Build Tutorial Screens

1. 建立一個ViewController for UIPageViewController , 並將這個controller當作是conainer , 用來顯示每個child page



 2. 建立 UIPageViewController




3. 建立一個自定function



4. 宣告一個變數,作為參數傳遞用,接收 parent PageViewController 傳入的參數



5. 在child page 顯示目前滑動到第幾頁



6. 執行結果


2014年4月6日 星期日

iOS SDK 讀取 json 中文 sample

整理了一下google上 iOS SDK 前輩上的資料,彙整成容易上手的快速使用範例

1.建立json檔案,並且確認其格式是正確的




2.貼上下列程式碼即可




Related Posts Plugin for WordPress, Blogger...