【問題】進入編輯畫面時,已有資料,但資料總是被清空

進入編輯畫面時,明明就有資料,但是輸入的文字方塊都一直是空白,而我在EditViewController的viewWillAppear中確實有將資料指定給textField.text了。
回答:因為文字方塊被設成Clear text when begin editing,把這個勾選的項目拿掉就可以了。

免費的Icon資源

免費的icon網站,抓之前要看一下版權說明

http://www.webappers.com/category/design/icons/
http://www.iconfinder.net/

題目 : iphone
種類 : Moblog

在sqlite語法中使用between抓取特定日期資料

可參考下列文章

http://stackoverflow.com/questions/1320219/iphone-sqlite-date-problem

題目 : iphone
種類 : 手機部落

Objective-C Memory Management Tips

【十個Memory Management技巧】
http://kosmaczewski.net/2009/01/28/10-iphone-memory-management-tips/

【九個Memory Management的連結及資源】
http://www.mobileorchard.com/iphone-memory-management/

【Objective-C記憶體管理】
http://macdevelopertips.com/objective-c/objective-c-memory-management.html

【Apple官方記憶體管理文件】
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html

【Cocoa中簡單的記憶體管理規則】
http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

「太好用了,總算找到啦」日期格式化:NSDateFormatter

[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle:NSDateFormatterLongStyle];
[dateFormatter setTimeStyle:NSDateFormatterNoStyle];
NSDate *date = [NSDate date];

NSString *formattedDateString = [dateFormatter stringFromDate:date];
NSLog(@"Formatted date string for locale %@: %@", [[dateFormatter locale] localeIdentifier], formattedDateString);

//Custom Date Formatter.
NSDateFormatter *customDateFormatter = [[NSDateFormatter alloc] init];

//When setting the date format, do not set the date and time format style.
//Only one of the two can be set if not, the latter setting will take precedence.
[customDateFormatter setDateFormat:@"yyyyMM"];

NSLog(@"%@", [customDateFormatter stringFromDate:date]);


相關參考:
Apple Class Reference
Apple官方:Data Formatting Programming Guide
iPhone SDK Articles教學

搜尋欄
RSS連結
連結
Powered By FC2部落格

馬上開始部落格吧!!

Powered By FC2部落格

加為好友

和此人成爲好友