logo
down
shadow

COCOA QUESTIONS

NSPopover + NSBox in dark mode tint/gamma issue
NSPopover + NSBox in dark mode tint/gamma issue
hop of those help? Solved by adding extra NSVisualEffectView behind the NSBox where blending is set to happen within window. left(with visual effect view), right (without).
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Magnus
Alternative Menu Items in NSMenu
Alternative Menu Items in NSMenu
will be helpful for those in need You should set an object as the delegate of your menu and then implement the delegate method -menu:updateItem:atIndex:shouldCancel:.This will allow you to change the state of your custom view before the menu item is
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : µilad
Core Animation not working on Leopard, working on Snow Leopard
Core Animation not working on Leopard, working on Snow Leopard
I hope this helps . This probably should have been in the AppKit release notes. In 10.5, -[NSView alphaValue] only has any effect for layer backed views. This limitation is lifted in 10.6.
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Menno
Trying to create link with NSTextField
Trying to create link with NSTextField
Any of those help I have found another easy way to show links in NSTextField. You can use HTML. Here is a short example:
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Ryuken
how to create drag and drop mac installer?
how to create drag and drop mac installer?
it should still fix some issue Seth Willits' DMG Canvas is a great and easy way to create customized DMGs (with things like an Applications folder shortcut, background image, etc). Yes, you can do this all yourself with hdiutil and whatnot, but I muc
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : jsmb
How to customize NSMenu like the Apple Pro Apps?
How to customize NSMenu like the Apple Pro Apps?
this will help The hard answer is, make your own, subclass NSMenu, NSMenuItem etc and manually handle the drawing, animations etc.
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Cowtung
Trying to resize an NSImage which turns into NSData
Trying to resize an NSImage which turns into NSData
should help you out I found this blog post to be very helpful for resizing my image: http://weblog.scifihifi.com/2005/06/25/how-to-resize-an-nsimage/You will need to enforce the aspect ratio on the image resizing yourself, it won't be done for you. T
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Richard Laksana
Cocoa - Enumerate mutable array, removing objects
Cocoa - Enumerate mutable array, removing objects
this one helps. Count up an index variable as you enumerate. When you come upon a dictionary you're interested in removing, add its index to a mutable index set. Then, when you finish enumerating, send the array a removeObjectsAtIndexes: message, pas
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : cnemelka
Should I be aiming for no analyzer results when I run Build and Analyze
Should I be aiming for no analyzer results when I run Build and Analyze
like below fixes the issue First of all, all compiler warnings are just errors that will only show up in the runtime. They don't prevent compilation but they will eventually cause a serious problem somewhere down the road. You should go into the buil
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : alexmajy
Core data and @unionOfSets
Core data and @unionOfSets
This might help you You're using @unionOfArrays rather than @unionOfSets. As the error indicates, this is an array operation rather than a set one.
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Eran Yahav
NSPredicate and arrays
NSPredicate and arrays
seems to work fine Here's the real reason why it's not working:When you build a string using stringWithFormat:, it's going to come up looking like this:
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Guy Kastenbaum
Where is NSTextfield Validates Immediately?
Where is NSTextfield Validates Immediately?
wish helps you That is an option that is available when you use bindings to connect your text field.
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Liy
What to subclass for clickedRow (NSTableView)
What to subclass for clickedRow (NSTableView)
around this issue It sounds to me like you want the highlightSelectionInClipRect: method.If you're looking to make a source list (like in iTunes, Mail, and the Finder), you should use the setSelectionHighlightStyle: method (or set that property in IB
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : Gazza
Converting NSData to an NSString representation is failing
Converting NSData to an NSString representation is failing
Hope this helps If you want to transform some arbitrary binary data into a human readable string (for example, of a series of hex values) you are using the wrong method. What you are doing is interpreting the data itself as a string in ASCII encoding
TAG : cocoa
Date : January 02 2021, 06:48 AM , By : user92243
NSOutlineView detect when children are collapsed
NSOutlineView detect when children are collapsed
it should still fix some issue Some ideas:NSOutlineView can save and restore the expanded items (autosaveExpandedItems). The settings can be retrieved from NSUserDefaults. The key is NSOutlineView Items .
TAG : cocoa
Date : December 23 2020, 09:30 PM , By : ArmHead
Check case-sensitivity from Cocoa
Check case-sensitivity from Cocoa
help you fix your problem You are looking for NSURL's method getResourceValue:forKey:error: or resourceValuesForKeys:error: and the NSURLResourceKey keys NSURLVolumeSupportsCasePreservedNamesKey and NSURLVolumeSupportsCaseSensitiveNamesKey.
TAG : cocoa
Date : December 05 2020, 06:54 AM , By : redha
Using NSHomeDirectory as root
Using NSHomeDirectory as root
seems to work fine It appears that the home directory of the root user is indeed set to /var/root on OSX.On linux it's usually /root/
TAG : cocoa
Date : November 18 2020, 03:46 PM , By : tanminivan
Odd behavior of rowForView and selectRowIndexes in NSOutlineView
Odd behavior of rowForView and selectRowIndexes in NSOutlineView
To fix this issue Turns out it really helps to bind the IBOutlet for the view you're trying to manipulate.. Rookie mistake on my part.
TAG : cocoa
Date : November 18 2020, 03:42 PM , By : user147496
How to get IBOutlet for NSColorPanel opened by a NSToolbarItem
How to get IBOutlet for NSColorPanel opened by a NSToolbarItem
around this issue I figured it out! Yay me! What you need to do is implement -(void)changeColor: in the First Responder. Inside, just type [sender color] to get the color!
TAG : cocoa
Date : November 18 2020, 12:01 PM , By : Paolo
NSStackView and subviews with intrinsic content size
NSStackView and subviews with intrinsic content size
I wish this help you [stackView constraints] is probably returning an empty array -- which is incorrect and causing the problem. If that's the case, then nothing is triggering an initial pass of updating constraints or layout when the stack view is i
TAG : cocoa
Date : November 16 2020, 06:27 AM , By : doctorbigtime
How to change color of NSPathControl
How to change color of NSPathControl
will help you Not supported out of the box - you need to roll your own.Or have a look at the various 3rd party implementations out there like ITPathbar: https://www.cocoacontrols.com/controls/itpathbar
TAG : cocoa
Date : November 07 2020, 09:00 AM , By : Marc
Cocoa: react to keyDown in QLPreviewPanel
Cocoa: react to keyDown in QLPreviewPanel
I wish did fix the issue. Finally found what I was looking for and it's actually pretty simple.Since my main view controller is also my delegate for the QLPreviewPanel, I added this:
TAG : cocoa
Date : October 29 2020, 11:32 PM , By : Pip
how to customize NSTokenField like in "To/ CC" fields in mac mail?
how to customize NSTokenField like in "To/ CC" fields in mac mail?
like below fixes the issue You'll have to subclass NSTokenField to get the functionality you want. Be sure and call setWraps: YES. When the contents of the token field changes, you'll have to calculate the required size of your token field and resize
TAG : cocoa
Date : October 23 2020, 03:00 PM , By : Terrence Poon
How to link Cocoa static library to C command line target?
How to link Cocoa static library to C command line target?
I think the issue was by ths following , Add the Foundation framework to your project and to the Link Libraries build phase in your target. The easiest way to do the latter is to Get Info on the target; there's a list of linked libraries on the Gener
TAG : cocoa
Date : October 21 2020, 11:12 PM , By : Tony Z
How to make an NSMenu recent list
How to make an NSMenu recent list
it should still fix some issue I need to have that list add an item each time a URL is shortened, …
TAG : cocoa
Date : October 19 2020, 11:12 AM , By : user165871
Recording audio on Mac
Recording audio on Mac
I think the issue was by ths following , Look at the CoreAudio sample code at developer.apple.com. There is plenty of useful code there.In particular look at the RecordAudioToFile example.
TAG : cocoa
Date : October 15 2020, 01:20 AM , By : dantino
How to figure out if the network the mac is connected to is a WiFi or cable network or the like
How to figure out if the network the mac is connected to is a WiFi or cable network or the like
this one helps. You can tell whether the Mac is using WiFi, whether it is using a modem, and whether it is using hard Ethernet (which could be cable, DSL, or something else). Note that these are not mutually exclusive, there may be multiple connectio
TAG : cocoa
Date : October 15 2020, 01:19 AM , By : toki
QTMovie pauses on minimize?
QTMovie pauses on minimize?
wish helps you I did a quick test and for me the movie doesn't pause when the window is minimized. You should set a breakpoint at -[QTMovie stop] and see where it's being called from when minimized.
TAG : cocoa
Date : October 14 2020, 01:11 PM , By : Mark W
shadow
Privacy Policy - Terms - Contact Us © scrbit.com