Skip to content

Instantly share code, notes, and snippets.

@osanaikoutarou
Last active November 7, 2018 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osanaikoutarou/453aa5d4478a1ca9a464eb296cf60a1c to your computer and use it in GitHub Desktop.
Save osanaikoutarou/453aa5d4478a1ca9a464eb296cf60a1c to your computer and use it in GitHub Desktop.
[teratail]156732
// iOS 11.4
// Xcode 9.4
// KILabel 1.0.0 by cocoapods
import UIKit
import KILabel
class ViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
}
}
extension ViewController: UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 100
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CustomCell", for: indexPath) as! CustomCell
cell.label.text = "あああああいいいいいいうううううえええええおおおおおかかかかかきききききくくくくくけけけけけこここここ"
return cell
}
}
class CustomCell: UITableViewCell {
@IBOutlet weak var label: KILabel!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment