Skip to content

Instantly share code, notes, and snippets.

@fitsyu
fitsyu / OneSectioned UITableView Snippet.swift
Last active July 6, 2019 06:10
A snippet to easily create the boilerplate UITableView DataSource and Delegate
extension <#_#>: UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return <#models#>.count
}
@macneko-ayu
macneko-ayu / InterfaceController.swift
Last active April 25, 2020 13:05
WKInterfaceLabel to automatically scroll horizontally
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet var notEndlessLabel: WKInterfaceLabel!
@IBOutlet var endlessLabel: WKInterfaceLabel!
override func awake(withContext context: Any?) {
super.awake(withContext: context)