Last active
November 7, 2018 14:59
-
-
Save osanaikoutarou/453aa5d4478a1ca9a464eb296cf60a1c to your computer and use it in GitHub Desktop.
[teratail]156732
This file contains 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
// 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