2021-04-18
Tips and Tricks.
All #accessibility #cloud9 #codepen #concept #css #css-basic #css-flex #css-grid #data-url #html #html-form #inspirations #ios #javascript #lang-zh #layout #link #mobile #mobile-web #mysql #php #php-basic #podcast #progress-enhancement #python #resilient #resources #swift #ui-design #user-media #video #wordpress
2021-04-18
2021-04-18
2021-04-18
// set UserDefaults.standard.set("anything", forKey: "yourKey") // get UserDefaults.standard.value(forKey: "yourKey")
2021-04-18
2021-04-18
tableView.refreshControl = UIRefreshControl() tableView.refreshControl?.addTarget(self, action: #selector(fetchData), for: .valueChanged)
2019-05-18
Native sharing on mobile browsers via JavaScript.
2019-04-27
2018-10-20
imageButton.imageView?.contentMode = .scaleAspectFill
imageButton2.imageView?.contentMode = .scaleAspectFit
let image = UIImage(named: "button.png")?.resizableImage(withCapInsets: UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10))
backgroundButton.setBackgroundImage(image, for: .normal)
2018-10-14
Here is an example of using ISO8601DateFormatter
and sorted(by:)
in Swift and iOS.
ISO 8601 is the YYYY-MM-DD format to represent date. In ISO8601DateFormatter
, Swift expects the time as well: YYYY-MM-DDTHH:MM:SSZ. If we simply need the date without the time, we can set the .withFullDate
format option.
let dateFormatter = ISO8601DateFormatter()
dateFormatter.formatOptions = .withFullDate
let date = dateFormatter.date(from: "2018-10-11")
2017-04-24
https://developer.apple.com/reference/livephotoskitjs/
<div
data-live-photo
data-shows-native-controls
data-photo-src="https://cdn.makzan.net/IMG_7677.JPG"
data-video-src="https://cdn.makzan.net/IMG_7677.mov"
style="width:320px;height:320px;"
>
<img src='https://cdn.makzan.net/IMG_7677.JPG' alt='Sample Live Photo in Macao Science Center.'>
</div>