2015年4月28日 星期二

Cannot set text color of Send and Cancel buttons in the mail composer when presented from the UIActivityViewController in iOS7

http://stackoverflow.com/questions/19368122/cannot-set-text-color-of-send-and-cancel-buttons-in-the-mail-composer-when-prese

http://stackoverflow.com/questions/19368122/cannot-set-text-color-of-send-and-cancel-buttons-in-the-mail-composer-when-prese

2015年4月19日 星期日

2015年3月28日 星期六

Swift Stepper

http://www.ioscreator.com/tutorials/uistepper-tutorial-ios8-swift

Put UIDatePicker inside static UITableView

http://manenko.com/2014/12/19/put-uidatepicker-inside-static-uitableview/

電腦內資料 app / swift 隱藏 cell

2015年3月17日 星期二

陣列型別 參考

http://tommy60703.gitbooks.io/swift-language-traditional-chinese/content/chapter3/03_Types.html

陣列型別

Swift語言使用型別名緊接中括號[]來簡化標準函式庫中定義的命名型型別Array<T>。換句話說,下面兩個宣告是等價的:
let someArray: String[] = ["Alex", "Brian", "Dave"]
let someArray: Array<String> = ["Alex", "Brian", "Dave"]
上面兩種情況下,常數someArray都被宣告為字串陣列。陣列的元素也可以通過[]獲取存取:someArray[0]是指第0個元素“Alex”
上面的範例同時顯示,你可以使用[]作為初始值建構陣列,空的[]則用來來建構指定型別的空陣列。
var emptyArray: Double[] = []
你也可以使用鏈接起來的多個[]集合來建構多維陣列。例如,下例使用三個[]集合來建構三維整型陣列:
var array3D: Int[][][] = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
存取一個多維陣列的元素時,最左邊的下標指向最外層陣列的相應位置元素。接下來往右的下標指向第一層嵌入的相應位置元素,依次類別推。這就意味著,在上面的範例中,array3D[0]是指[[1, 2], [3, 4]]array3D[0][1]是指[3, 4]array3D[0][1][1]則是指值4
關於Swift標準函式庫中Array型別的細節討論,見章節Arrays。

2015年3月12日 星期四

swift CoreData EXC_BAD_ACCESS (code=1, address=0x0) when access empty property

http://www.tagwith.com/question_394893_coredata-exc-bad-access-code-1-address-0x0-when-access-empty-property

Did you specify default values for your attributes in your XCDataModel? 
If you generate an NSManagedObject subclasses you can change any attribute to an optional by adding a question mark to the declaration:
@NSManaged var stringProperty: String?
@NSManaged var dateProperty: NSDate?
Elsewhere you can do:
println(m.stringProperty?)
if m.stringproperty != nil {
// do stuff
}

2015年3月2日 星期一

swift filiter

http://rshelby.com/2014/09/filtering-arrays-containing-multiple-data-types-in-swift/

2015年2月28日 星期六

coredata swift

參考文章
http://rshankar.com/coredata-tutoiral-in-swift-using-nsfetchedresultcontroller/

2015年2月22日 星期日