1

How do I set a view to allow vibrancy in swift. I'm trying:

func allowsVibrancy() -> Bool {
    return true
}

but getting an error: Method 'allowsVibrancy()' with Objective-C selector 'allowsVibrancy' conflicts with getter for 'allowsVibrancy' from superclass 'NSView' with the same Objective-C selector

or even:

override func awakeFromNib() {
    self.allowsVibrancy = true
    println(self.allowsVibrancy)
}

I can do this in Onjective C with:

- (BOOL)allowsVibrancy {
    return YES;
}

Any thoughts?

Jimmy Jam
  • 107
  • 1
  • 6

1 Answers1

4

You should override property, not method

override var allowsVibrancy: Bool { return true }
Vincenso
  • 516
  • 4
  • 8