跳到主要內容

new iOS app start

register collectionview cell
https://stackoverflow.com/questions/41191491/using-collectionview-in-uiview-with-xib-file

Alamofire 4 to 5 no request
https://stackoverflow.com/questions/28549832/module-alamofire-has-no-member-named-request

json to model
https://app.quicktype.io/

completionhandler swift4.2  Medium
https://medium.com/@nimjea/completion-handler-in-swift-4-2-671f12d33178

closure
https://stackoverflow.com/questions/50243148/swift-why-dont-class-methods-need-closure-lists

layout comparison code xib storybord
https://onevcat.com/2013/12/code-vs-xib-vs-storyboard/

appcoda grand-central-dispatch GCD
https://www.appcoda.com.tw/grand-central-dispatch/
https://stackoverflow.com/questions/29852431/alamofire-asynchronous-completionhandler-for-json-request

storyboard outlet and referencing outlet
https://stackoverflow.com/questions/633295/what-is-a-referencing-outlet

struct init with property
https://stackoverflow.com/questions/37553626/swift-initialize-struct-with-optional-stored-properties

call different storyboard viewcontroller
https://stackoverflow.com/questions/24840306/how-to-call-different-storyboards-via-swift-for-ios

check textfield isempty or nil
https://stackoverflow.com/questions/24102641/how-to-check-if-a-text-field-is-empty-or-not-in-swift

#pragma mark
https://stackoverflow.com/questions/24017316/pragma-mark-in-swift

hiding keyboard with return key
https://stackoverflow.com/questions/24180954/how-to-hide-keyboard-in-swift-on-pressing-return-key

move view upper and touch anywhere close keyboard
https://stackoverflow.com/questions/24126678/close-ios-keyboard-by-touching-anywhere-using-swift

留言

這個網誌中的熱門文章

collection view part6 swift

preselect collectionview https://stackoverflow.com/questions/45610785/how-to-preselect-and-highlight-a-cell-from-a-uicollectionview https://hackernoon.com/uicollectionviewcell-selection-made-easy-41dae148379d if collectionview allow multiple selection remeber add this, cell item could be Deselect collectionView. selectItem (at: indexPath, animated: true , scrollPosition: . top ) https://stackoverflow.com/questions/15330844/uicollectionview-select-and-deselect-issue save indexpath userdefault https://stackoverflow.com/questions/34804294/how-to-save-nsindexpath-locally https://stackoverflow.com/questions/37001643/how-to-add-nsindexpath-to-nsuserdefaults-in-swift navigation presneted viewcontroller dismiss https://stackoverflow.com/questions/31205002/why-is-it-bad-practice-to-have-a-viewcontroller-dismiss-itself indexpath comparison         if selectIndexPath . contains (indexPath) {             cell. isSelect...

android java 小數點的坑

如果temp  = 12.5                         val newTemp = "%.1f".format(Tempvalue) 原本的寫法是這樣 在法語區 將newTemp.toFloat() 後會掛,因為法語地區的小數點是 , 逗號 所以沒法轉成 12.5  會變成 12,5 後來的解法 將拿到的數字硬轉成 12.5  其他就不管了 val newTemp = "%.1f" . format ( Locale . US , Tempvalue)

collection view part 5 swift

load plist data https://www.cnblogs.com/gongyuhonglou/p/6029340.html https://blog.csdn.net/sophieDJF/article/details/88247388 https://stackoverflow.com/questions/24045570/how-do-i-get-a-plist-as-a-dictionary-in-swift https://stackoverflow.com/questions/40436895/how-to-read-plist-without-using-nsdictionary-in-swift get specifig key in dictionary https://stackoverflow.com/questions/24640990/how-do-i-get-the-key-at-a-specific-index-from-a-dictionary-in-swift get specifig key with index https://stackoverflow.com/questions/31775724/swift-dictionary-access-via-index get collectionview selection https://stackoverflow.com/questions/21639394/how-to-select-item-in-collectionview-programmatically add button in uinavigationbar https://www.hackingwithswift.com/example-code/uikit/how-to-add-a-bar-button-to-a-navigation-bar child viewcontroller pass data to parent viewcontroller https://stackoverflow.com/questions/39285588/how-to-pass-data-from-child-to-parent-view-controller-in-sw...