From 525eee1742853836c59eb3cdd4d3a1ed374a411c Mon Sep 17 00:00:00 2001 From: Robert McGovern Date: Fri, 17 Apr 2020 21:17:24 +0100 Subject: [PATCH] Added some code to test syntax highlighting. --- _drafts/swiftui.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_drafts/swiftui.md b/_drafts/swiftui.md index a023b25..ae884bb 100644 --- a/_drafts/swiftui.md +++ b/_drafts/swiftui.md @@ -20,3 +20,12 @@ Easy to mock in data Buggy. Filled 3 bugs so far. + +{% highlight swift %} + override public func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + currentTouchPosition = touches.first?.location(in: self) + + NSObject.cancelPreviousPerformRequests(withTarget: self) + } +{% endhighlight %}