跳到主要內容

發表文章

目前顯示的是 5月, 2019的文章

swift 190531 part2

how-to-make-both-header-and-footer-in-collection-view-with-swift https://stackoverflow.com/questions/29655652/how-to-make-both-header-and-footer-in-collection-view-with-swift IOS-nRF-Toolbox https://github.com/NordicSemiconductor/IOS-nRF-Toolbox https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate Swift Class vs Struct:設計 Model 時,該用 Struct 還是 Class 呢? https://www.appcoda.com.tw/swift-class/ swift-struct-doesnt-conform-to-protocol-equatable https://stackoverflow.com/questions/37541512/swift-struct-doesnt-conform-to-protocol-equatable bluetooth-low-energy-characteristic-value-from-byte https://stackoverflow.com/questions/33441870/bluetooth-low-energy-characteristic-value-from-byte how-do-i-change-the-font-size-of-a-uilabel-in-swift https://stackoverflow.com/questions/24356888/how-do-i-change-the-font-size-of-a-uilabel-in-swift uitextfield-leftview-rightview-padding-on-ios7 https://stackoverflow.com/questions/19371018/uitextfield-leftview-ri...

swift 190531 part1

checking-if-textfields-are-empty-swift https://stackoverflow.com/questions/38162602/checking-if-textfields-are-empty-swift xcode-ios-how-to-determine-whether-code-is-running-in-debug-release-build https://stackoverflow.com/questions/9063100/xcode-ios-how-to-determine-whether-code-is-running-in-debug-release-build JSON to model https://app.quicktype.io/ storyboard-vs-uistoryboardname-main-bundle-nil https://stackoverflow.com/questions/32850853/storyboard-vs-uistoryboardname-main-bundle-nil swift-enums-vs-structures-vs-classes https://medium.com/@saad.eloulladi/swift-enums-vs-structures-vs-classes-938a4cd76c0d what-is-swift-enum-byte-representation https://stackoverflow.com/questions/38305976/what-is-swift-enum-byte-representation circular-progress-bar-in-ios https://codeburst.io/circular-progress-bar-in-ios-d06629700334 https://gist.github.com/yogeshmanghnani/d73ad00eed7b3b55784c0d24e9852332 https://gist.githubusercontent.com/yogeshmanghnani/d73ad00eed7b3b55784c0d24...

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-initializ...

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...

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...

collectionview part 4 swift

string to float swift https://www.hackingwithswift.com/example-code/language/how-to-convert-a-string-to-a-float static method with struct method https://stackoverflow.com/questions/13372194/whats-the-difference-between-a-static-struct-method-and-a-static-class-method dateformat swift https://stackoverflow.com/questions/35700281/date-format-in-swift get specific CALayer swift https://stackoverflow.com/questions/26402170/how-can-i-select-calayer-in-swift-by-index replace CALayer https://stackoverflow.com/questions/39706137/how-to-replace-current-calayer repeating array swift https://stackoverflow.com/questions/37095943/repeating-array-in-swift cell button clicked https://stackoverflow.com/questions/44368515/swift-3-how-to-get-button-in-uicollectionviewcell-work cell button clicked with delegate https://stackoverflow.com/questions/20655060/get-button-click-inside-uitableviewcell https://medium.com/@aapierce0/swift-using-protocols-to-add-custom-behavior-to-a-uitablev...

collection view part3 swift

make random color for test, i put in cell background color watch diff https://stackoverflow.com/questions/29779128/how-to-make-a-random-color-with-swift because use CYlayer, i have to remove layer https://stackoverflow.com/questions/10789766/remove-all-sublayers-from-a-view https://stackoverflow.com/questions/37581951/ios-how-to-remove-previously-added-sublayers-of-a-uiview/37581988 alpha gradint with imageview https://stackoverflow.com/questions/11807876/transparent-alpha-gradient-with-core-graphic-iphone swift map and flatmap http://swiftcafe.io/2016/03/28/about-map/ get local date and time https://stackoverflow.com/questions/28404154/swift-get-local-date-and-time swift dictionary basic https://stackoverflow.com/questions/27313242/how-to-append-elements-into-dictionary-in-swift add 1 day to NSDate https://stackoverflow.com/questions/5067785/how-do-i-add-1-day-to-an-nsdate get keys from dictionay https://stackoverflow.com/questions/26386093/array-from-dictionary...

collectionview part2 swift

draw circle with beize https://stackoverflow.com/questions/28442516/an-easy-way-to-draw-a-circle-using-cashapelayer https://stackoverflow.com/questions/29616992/how-do-i-draw-a-circle-in-ios-swift move constraint https://stackoverflow.com/questions/30823325/how-to-move-a-uiview-programmatically-in-swift updateview after set constraint   layoutIfNeeded () https://stackoverflow.com/questions/31948123/determining-width-of-a-uiview-using-autolayout-swift https://stackoverflow.com/questions/20590105/hot-to-get-uilabel-width-using-autolayout determine screen size https://stackoverflow.com/questions/24110762/swift-determine-ios-screen-size draw line in circle https://stackoverflow.com/questions/26662415/draw-a-line-with-uibezierpath collectionview Header https://stackoverflow.com/questions/21731318/add-a-simple-uiview-as-header-of-uicollectionview rectangle with radius https://stackoverflow.com/questions/30368739/how-to-draw-a-simple-rounded-rect-in-swift-rounded...