Posts

Post not yet marked as solved
0 Replies
79 Views
Hi How can I detect if user get push notification on macOS? Thanks!
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
108 Views
Hi, I just add airplay to my app and I tried to stream to my TV but not works AirPlay code:   //Airplay button     let routePickerView = AVRoutePickerView.init(frame: airplayButton.frame)     routePickerView.isRoutePickerButtonBordered = false     self.view.addSubview(routePickerView)let asset = AVAsset(url: URL(string: "https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8")!)
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
1 Replies
124 Views
Hi, How can I add vibrancy to image/NSButton for example my play button (macOS) I found a SwiftUI library for this but I don't use swift UI https://github.com/lucasbrown/swiftui-visual-effects My app
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
148 Views
Hi, I just updated to macOS Monterey and Xcode 13.1 and the NSButtons on my view not work anymore I tap and nothing work    let visualEffect = NSVisualEffectView()     //var theme = NSAppearance(appearanceNamed: NSAppearance.Name.vibrantDark, bundle: nil)     visualEffect.translatesAutoresizingMaskIntoConstraints = false     visualEffect.blendingMode = .behindWindow     visualEffect.state = .active     visualEffect.wantsLayer = true     visualEffect.layer?.cornerRadius = roundvalueDefault.value(forKey: "roundvaluekey") as! CGFloat     visualEffect.layer?.opacity = 0.0     window?.isOpaque = false     window?.backgroundColor = .clear //Make window transpraent     window?.isMovableByWindowBackground = true     checkAlt() //Check if floating           //Custom toolbar     let customToolbar = NSToolbar()     customToolbar.isVisible = true     window?.titleVisibility = .hidden     window?.styleMask.insert(.fullSizeContentView)     window?.titlebarAppearsTransparent = true     customToolbar.showsBaselineSeparator = false     window?.contentView?.wantsLayer = true     window?.toolbar = customToolbar           //Change windows radius           //Add the blur effcet to the window     window?.contentView?.addSubview(visualEffect)           guard let constraints = window?.contentView else {      return     }     visualEffect.leadingAnchor.constraint(equalTo: constraints.leadingAnchor).isActive = true     visualEffect.trailingAnchor.constraint(equalTo: constraints.trailingAnchor).isActive = true     visualEffect.topAnchor.constraint(equalTo: constraints.topAnchor).isActive = true     visualEffect.bottomAnchor.constraint(equalTo: constraints.bottomAnchor).isActive = true   }  @IBAction func airplayTapped(_ sender: Any) {     print("AAA")   }
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
2 Replies
189 Views
Hi, I'm trying to add a drop shadow for NSImageView with NSBeizerPath but the shadow does not appear //add cgPath var to NSBezierPath extension NSBezierPath {   public var cgPath: CGPath {     let path = CGMutablePath()     var points = [CGPoint](repeating: .zero, count: 3)     for i in 0 ..< elementCount {       let type = element(at: i, associatedPoints: &points)       switch type {       case .moveTo:         path.move(to: points[0])       case .lineTo:         path.addLine(to: points[0])       case .curveTo:         path.addCurve(to: points[2], control1: points[0], control2: points[1])       case .closePath:         path.closeSubpath()       @unknown default:         continue       }     }     return path   } } //View var albumImage = NSImageView()        albumImage.layer?.shadowRadius = 10.0       albumImage.layer?.shadowColor = .black       albumImage.layer?.shadowOffset = CGSize(width: 10, height: 10)       albumImage.layer?.shadowOpacity = 1.0       albumImage.layer?.shadowPath = NSBezierPath(roundedRect: albumImage.bounds, xRadius: 28.0, yRadius: 28.0).cgPath
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
212 Views
Hi, How can I show the avaliable list device for AirPlay like this?
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
182 Views
Hi, I override keyUp function to detect if the space key is press everything works but the screen blink with a white flash every time I press space key how can I fix it? override func keyUp(with event: NSEvent) {     //Tap on escape 0x31 = Space     if event.keyCode == UInt16(0x31){       print("Hello")     }   }
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
156 Views
Hi, How can I override property shadowColor from NSShadow? thanks!
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
193 Views
HI, Is it possible to add a private framework to the project? I tried to import MediaRemote.framework but Xcode does not find the framework also when I added the path to the framework in Framework linker
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
0 Replies
160 Views
Hi, I'm using NSButton and the vibrancy effect works only when the system is in dark mode How can I get a vibrancy effect also on light mode?
Posted
by aviorrok.
Last updated
.
Post not yet marked as solved
2 Replies
231 Views
Hi, How can I make NSTextField vibracny? I added a NSVisualEffectView and add a label how can I make my label vibrancy https://imgur.com/a/Y6axxms Thanks!
Posted
by aviorrok.
Last updated
.