-
Notifications
You must be signed in to change notification settings - Fork 0
/
CoolTextView.swift
37 lines (29 loc) · 987 Bytes
/
CoolTextView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// CoolTextView.swift
// Scott Fitsimones
//
// Created by Scott Fitsimones on 4/17/15.
// Copyright (c) 2015 Bolt Visual. All rights reserved.
//
import Cocoa
class CoolTextView: NSTextView {
override init(frame frameRect: NSRect, textContainer aTextContainer: NSTextContainer!) {
super.init(frame: frameRect, textContainer: aTextContainer)
self.font = NSFont(name: "HelveticaNeue-Light", size: 38)
self.editable = false
self.alignment = NSTextAlignment.CenterTextAlignment
self.backgroundColor = NSColor.clearColor()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func hitTest(aPoint: NSPoint) -> NSView? {
return nil
}
override func mouseMoved(theEvent: NSEvent) {
NSCursor.arrowCursor().self
}
override func resetCursorRects() {
self.addCursorRect(self.bounds, cursor: NSCursor.arrowCursor())
}
}