- Apple文件
- 入門
- Developer's Note
解說得相當詳細,值得參考。 - Furnace iOS 程式設計中文學習網站
這是我常瀏覽的網站,文章也不錯,教的也很詳細。 - 大舌音
這也是不錯的文章,流程相當仔細。 - RUN! PC
這是最為簡單的,所以資訊相對的就比較少了。 - iOS程式開發與XCode4.X-Storyboard(上)
- iOS程式開發與XCode4.X-Storyboard(下)
- iOS程式開發與XCode 4.X-使用XCode4.2中的storyboard
- Ray Wenderlich
雖說是入門,但是我覺得內容就比較難些了,如果英文不是問題,建議看原文的,翻譯的有點怪怪的。 - xxd - 博客园
目前有五篇文章,內容上似乎有其他網頁的影子。 - mobile.tutsplus
入門的好文章,基礎內容都有提到,唯一要克服的就是英文。 - 技術分享,王軍的博客
- minglz - 博客园
- Autolayout
- shenfive.pixnet
- Ray Wenderlich
- 其他資源
2013年5月13日 星期一
Storyboard 入門文章整理
這邊將這兩週所閱讀的文章進行個簡單的整理,方便日後搜尋。
dismiss 與 present
畫面切換的method在iOS6.0之後有些許的調整,
目前在使用上是沒有問題的,就是換出現警告。
dismissViewControllerAnimated:completion: 取代dismissModalViewControllerAnimated:
presentViewController:animated:completion:
取代 presentModalViewController:animated:
目前在使用上是沒有問題的,就是換出現警告。
dismissViewControllerAnimated:completion: 取代
Cell 使用不同的背景
之前工作上有個需求,希望第一跟最後一個Cell能加上陰影,
當時沒想出解決的方法。
今天看到下面這篇文章, 覺得這方式也不錯,或許是個方式,這邊記錄一下。
有機會再來試一下。
http://www.appcoda.com/ios-programming-customize-uitableview-storyboard
當時沒想出解決的方法。
今天看到下面這篇文章, 覺得這方式也不錯,或許是個方式,這邊記錄一下。
有機會再來試一下。
http://www.appcoda.com/ios-programming-customize-uitableview-storyboard
- (UIImage *)cellBackgroundForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSInteger rowCount = [self tableView:[self tableView] numberOfRowsInSection:0];
NSInteger rowIndex = indexPath.row;
UIImage *background = nil;
if (rowIndex == 0) {
background = [UIImage imageNamed:@"cell_top.png"];
} else if (rowIndex == rowCount - 1) {
background = [UIImage imageNamed:@"cell_bottom.png"];
} else {
background = [UIImage imageNamed:@"cell_middle.png"];
}
return background;
}
2013年5月7日 星期二
Storyboard 相關資訊及注意事項
Storyboard需iOS 5、XCode 4.2以上版本才開始支援。
- 其基礎為xib,增加其功能,與xib最明顯不同處在一個xib檔,僅代表一個screen,而一個strotyboard可包含多個screen。
- 一個專案中不限制只能有一個Storyboard檔案,可多個檔案並存,但若此取此方式,這可能就失去Storyboard其原有的意義了。
但是,若同時支援iPhone與iPad,Storyboard需分別使用不同的Storyboard檔案,並在info.plist中進行相關設定。 - 採用Storyboard的專案除可使用Storyboard進行開發之外,也可同時使用xib進行開發
- 在view controller切換,除了以原先以model或是navigate controller push的方式之外,另外增加了以segue方式切換。
- 採取Storyboard多人協同開發,並進行版本控制時,與xib有想同的問題,若同時對同一檔案維護時,可能會發生衝突問題。
- 另外,在iOS 6與iPhone 5釋出時,為配合iPhone 5 4吋螢幕,Storyboard增加了Autolayout功能,但該功能限制要最低版本為iOS 6以上,若在iOS 5編譯時程式會直接crash。
2013年3月11日 星期一
- drawRect: CGRectInset
最近用到了一個指令
所以做了個實驗並將果記錄下來
CGRectInset(CGRect rect, CGFloat dx, CGFloat dy)老是搞不清楚運作的方式
所以做了個實驗並將果記錄下來
rect = (0, 0 ,320, 480)
CGRectInset(rect, 0, 0) => x = 0.000000, y = 0.000000, width = 320.000000, height = 480.000000
CGRectInset(rect, 10, 0) => x = 10.000000, y = 10.000000, width = 300.000000, height = 480.000000
CGRectInset(rect, 20, 0) => x = 20.000000, y = 20.000000, width = 280.000000, height = 480.000000
CGRectInset(rect, 0, 10) => x = 0.000000, y = 0.000000, width = 320.000000, height = 460.000000
CGRectInset(rect, 0, 20) => x = 0.000000, y = 0.000000, width = 320.000000, height = 440.000000
CGRectInset(rect, 10, 20) => x = 10.000000, y = 10.000000, width = 300.000000, height = 440.000000
CGRect newRect = CGRectInset(CGRect rect, CGFloat dx, CGFloat dy)
newRect.origin.x = dx;
newRect.origin.y = dx;
newRect.size.width = rect.size.wide - dy * 2
newRect.size.height = rect.size.height - dy * 2
2013年2月26日 星期二
錯誤訊息_2013-02-26
*** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__nsarraym: data-blogger-escaped-0x75828d0=""> was mutated while being enumerated.' *** First throw call stack: (0x15a1012 0x12aee7e 0x1629cc5 0x3ec3 0x12c2705 0x1f62c0 0x1f6258 0x2b7021 0x2b757f 0x2b66e8 0x225cef 0x225f02 0x203d4a 0x1f5698 0x2603df9 0x2603ad0 0x1516bf5 0x1516962 0x1547bb6 0x1546f44 0x1546e1b 0x26027e3 0x2602668 0x1f2ffc 0x2bdd 0x2b05) libc++abi.dylib: terminate called throwing an exception
今天遇到了一個問題
Google "NSGenericException"之後找到了問題
起因是因為我要刪除Array中某元素所造成
這問題主因簡單來說就是太多層了
系統來不及反映所導致
比如說:我要刪除 a.array[0].array[1]
這樣就有可能會發生問題
2013年2月23日 星期六
Responds To Selector
在@select時
如果沒有選好常會有當掉的狀況
搜尋了一下
有篇文章的方法不錯記錄下來
http://blog.csdn.net/dongdongdongjl/article/details/8498555
使用respondsToSelector@select(Method)
來判斷是否有此Method
這樣就比較不會當掉了
如果沒有選好常會有當掉的狀況
搜尋了一下
有篇文章的方法不錯記錄下來
http://blog.csdn.net/dongdongdongjl/article/details/8498555
使用respondsToSelector@select(Method)
來判斷是否有此Method
這樣就比較不會當掉了
訂閱:
文章 (Atom)