Great tutorial. I believe there’s a bug around this code:
if !cell.isScrolling {
cell.tableView.scrollToRow(at: charIndexPath, at: .middle, animated: true)
}
If you scroll fast enough on the graph view, the graph and ticker values could mismatch since we’re skipping some values.
Yep, that’s true! Would have to make sure to move to the correct number once we detect a full stop! We can tap into the scroll view methods to detect whether the user has stopped and make sure that we’re showing the right number.
adm73
August 21, 2018, 4:27pm
4
Great Tutorial.
For Xcode v9.4.1:
AppDelegate.swift:
CHANGE
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
TO
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
ViewController.swift - Line: 64
CHANGE
addChild(tickerControl)
TO
addChildViewController(tickerControl)
ViewController.swift - LINE: 75
CHANGE
tickerControl.didMove(toParent: self)
TO
tickerControl.didMove(toParentViewController: self)
TickerCell.swift - LINE: 45
CHANGE
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setUpViews()
}
TO
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setUpViews()
}
@adm73 Thank you for performing the changes - much appreciated!