mirror of
https://github.com/joeblau/COSTouchVisualizer.git
synced 2024-09-11 12:36:58 +03:00
Update README.md
Simplify Swift usage example by using a lazy property. That makes the `visWindow` obsolete.
This commit is contained in:
parent
80c440883c
commit
929e6471d4
@ -12,11 +12,9 @@ Using COSTouchVisualizer is possible with Swift. Inside your AppDelegate, redef
|
||||
**With Storyboards**
|
||||
```swift
|
||||
class AppDelegate: UIResponder {
|
||||
var visWindow: COSTouchVisualizerWindow?
|
||||
var window: COSTouchVisualizerWindow? {
|
||||
if visWindow == nil { visWindow = COSTouchVisualizerWindow(frame: UIScreen.mainScreen().bounds) }
|
||||
return visWindow
|
||||
}
|
||||
lazy var window: COSTouchVisualizerWindow? = {
|
||||
COSTouchVisualizerWindow(frame: UIScreen.mainScreen().bounds)
|
||||
}()
|
||||
...
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user