Skip to content

Instantly share code, notes, and snippets.

View kientux's full-sized avatar
🎯
Focusing

Kien Nguyen kientux

🎯
Focusing
  • Appfactory
  • Hanoi, Vietnam
View GitHub Profile
@kientux
kientux / ioslocaleidentifiers.csv
Last active February 23, 2017 13:38 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
om_KE Oromo (Kenya)
om_KE Oromo (Kenya)
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
@kientux
kientux / frameworks_blogpost_merge_script.sh
Last active July 27, 2023 17:17 — forked from brett-stover-hs/frameworks_blogpost_merge_script.sh
Merge simulator and device dynamic frameworks into one
# Merge Script
# 1
# Set bash script to exit immediately if any commands fail.
set -e
# 2
# Setup some constants for use later on.
FRAMEWORK_NAME="${PROJECT_NAME}"
@kientux
kientux / uicollectionview+centerPaging.md
Last active November 25, 2021 10:13 — forked from vinhnx/uicollectionview+centerPaging.md
Centered Paging with Preview Cells on UICollectionView

Centered Paging with Preview Cells on UICollectionView

The proposed offset is where the collection view would stop without our intervention. We peek into this area by finding its centre as proposedContentOffsetCenterX and examine our currently visible cells to see which one’s centre is closer to the centre of that area.

class CenterItemPagingCollectionViewLayout: UICollectionViewFlowLayout {
    
    private var mostRecentOffset: CGPoint = .zero {
        didSet {
            notifyPageChanged()