The Document
is auto recognized for Sentence like String.
-- Cursor postion --⇣
A Random text. B Ran🙆dom String.
textDocumentProxy.documentContextBeforeInput //B Ran
textDocumentProxy.documentContextAfterInput //dom String.
map "ctrl+w" nextWindow | |
map "ctrl+W" previousWindow | |
unmap "w" | |
map "ctrl+k" nextTab | |
map "ctrl+j" previousTab | |
unmap "K" | |
unmap "J" |
protocol ATimer { | |
func start() | |
func stop() | |
var isRuning:Bool{get} | |
var timeInterval:TimeInterval{get set} | |
typealias Job = ()->Void | |
} | |
class AReapeatTimer:ATimer{ | |
var isRuning: Bool {return timer != nil} | |
init(job: @escaping Job) { |
extension URLSession{ | |
typealias URLResult = Result<(Data,URLResponse),Error> | |
typealias URLCallback = (URLResult)->Void | |
enum URLERROR:Error { | |
case nodata, reponseUnknow | |
} | |
func CallBackDataTask(with request:URLRequest, | |
callback:@escaping URLCallback){ | |
let task = dataTask(with: request) { (data, reponse, error) in | |
var result:URLResult |
usage
class AppDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let tabC = UITabBarController()
let mC = MCoordinator()
coordinator = MainCoordinator(tabBarController: tabC, tabs: [mC])
coordinator?.start()
class EndPointsManager{ | |
struct Route<Model:Codable,APIError:Codable>{ | |
let endpoint:String | |
let info:[String:String] | |
} | |
private let urlComponents:URLComponents | |
let session = URLSession.shared |