mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -3,6 +3,7 @@ import UIKit
|
||||
import QuartzCore
|
||||
import MetalKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
import AppBundle
|
||||
|
||||
final class DrawingMetalView: MTKView {
|
||||
@@ -53,10 +54,17 @@ final class DrawingMetalView: MTKView {
|
||||
self.autoResizeDrawable = false
|
||||
self.isOpaque = false
|
||||
self.contentScaleFactor = 1.0
|
||||
self.isPaused = true
|
||||
|
||||
self.setup()
|
||||
}
|
||||
|
||||
override var isHidden: Bool {
|
||||
didSet {
|
||||
self.isPaused = self.isHidden
|
||||
}
|
||||
}
|
||||
|
||||
required init(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
@@ -124,7 +132,12 @@ final class DrawingMetalView: MTKView {
|
||||
|
||||
self.drawable?.clear()
|
||||
|
||||
self.markerBrush?.pushPoint(CGPoint(x: 100.0, y: 100.0), color: DrawingColor.clear, size: 0.0, isEnd: true)
|
||||
Queue.mainQueue().after(0.1) {
|
||||
self.markerBrush?.pushPoint(CGPoint(x: 100.0, y: 100.0), color: DrawingColor.clear, size: 0.0, isEnd: true)
|
||||
Queue.mainQueue().after(0.1) {
|
||||
self.clear()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user