Non-resizable window swift

后端 未结 5 464
无人及你
无人及你 2020-12-09 18:48

I have a NSViewController named Hardness, and I need not to let user resize it. Of course, I can just resize it back every time the users tries, bu

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 19:30

    A little more elegant solution for Swift 3, so that the | operator can be used:

    public func | (left: NSWindowStyleMask, right: NSWindowStyleMask) -> NSWindowStyleMask {
        return NSWindowStyleMask(rawValue: left.rawValue | right.rawValue)
    }
    

提交回复
热议问题