add some code

LineViewController and AppDelegate.swift