https://time.sis.im/
https://time.sis.im/Asia/Jakarta
https://time.sis.im/help
https://time.sis.im/?help
https://time.sis.im/?timezone=Asia/Jakarta # rekomendasi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Color Scheme from [Chameleon](https://github.com/ViccAlexander/Chameleon) for IOS | |
@black-light:#545d63; | |
@black-dark:#262626; | |
@navy-light: #34495e; | |
@navy-dark: #2c3e50; | |
@sand-light: #f0deb4; | |
@sand-dark: #d5c295; | |
@yellow-light: #ffcd02; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
func format(bytes: Double) -> String { | |
guard bytes > 0 else { | |
return "0 bytes" | |
} | |
// Adapted from http://stackoverflow.com/a/18650828 | |
let suffixes = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] | |
let k: Double = 1000 |
A common task when developing iOS apps is to register custom cell subclasses for both UITableView
and UICollectionView
. Well, that is if you don’t use Storyboards, of course.
Both UITableView
and UICollectionView
offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)