跳到主要內容

iOS 20180624

date-to-milliseconds-and-back-to-date-in-swift
https://stackoverflow.com/questions/40134323/date-to-milliseconds-and-back-to-date-in-swift

Date Byte  BLE
how-to-convert-a-double-into-a-byte-array-in-swift
https://stackoverflow.com/questions/26953591/how-to-convert-a-double-into-a-byte-array-in-swift

ble-swift-write-characterisitc
https://stackoverflow.com/questions/26377615/ble-swift-write-characterisitc

round-trip-swift-number-types-to-from-data
https://stackoverflow.com/questions/38023838/round-trip-swift-number-types-to-from-data

nsdata-from-uint8
https://stackoverflow.com/questions/32455543/nsdata-from-uint8

switch-case-with-range
https://stackoverflow.com/questions/52665744/switch-case-with-range

how-in-swift-to-convert-int16-to-two-uint8-bytes



UI
how-to-detect-when-a-uiscrollview-has-finished-scrolling-in-swift
https://stackoverflow.com/questions/30582617/how-to-detect-when-a-uiscrollview-has-finished-scrolling-in-swift

uicollectionview-current-visible-cell-index


GPS
shorter-time-interval-for-location-updates
https://stackoverflow.com/questions/49040825/shorter-time-interval-for-location-updates

Realm DB

getting-started-with-realm-database-for-ios-in-swift

how-to-save-a-struct-to-realm-in-swift

how-to-find-my-realm-file

how-do-i-set-a-auto-increment-key-in-realm


Others

how-to-delete-a-user-default-value-in-nsuserdefaults

swift-beta-performance-sorting-arrays

how-to-perform-if-let-binding-with-struct-in-swift

swift-guard-let-and-where-the-priority

留言

這個網誌中的熱門文章

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

js30 d27 drag跑馬燈

https://github.com/richardhsieh18/js30/tree/master/course27 CSS transform: scale(0.98);  =>  transform: scale(1); js     isDown = true;     slider.classList.add('active');     startX = e.pageX - slider.offsetLeft;     scrollLeft = slider.scrollLeft;   });     if(!isDown) return; //stop the function from running     e.preventDefault();     const x = e.pageX - slider.offsetLeft;     const walk = (x - startX) * 3;     slider.scrollLeft = scrollLeft - walk;   });