I try to figure out, which NSViewSubclass is the overlapping one :
[[NSView Animated Overlap]]
Have you got any idea ?
I hope it's a Cocoa NSView Subclass... and if it's not, I would create a NSAnimated subview.
Thank you !
Have a look at NSPanel which does what you seem to be looking for
Ho, nice !
Actually, I never thought NSPanel would be used like that...
how-to-create-a-nspanel-modally-popuped-from-nswindow-cocoa-programming
Many thanks !
Related
I want to write a subview which is supposed to have a fixed height. The best would be, that I cannot change it in InterfaceBuilder, because it will be used a lot. If this would work out, it would be an awesome feature for me. But all custom views are freely resizable in InterfaceBuilder in Xcode. How can I achieve this?
A good example is the NSLevelIndicator. Here the height property in the Size Inspector is disabled.
Is there a way to write my own views in such a way that a property is unchangeable? I did a lot of searching but was not lucky in finding something that matched my question.
Thank you in advance
IBOutlet NSLevelIndicator *LED;
NSRect rect = LED.frame;
rect.size.height = 10.0;
[LED setFrame:rect];
I am trying to change the dots in a ParentViewController in function of which ChildViewController appears but I didn't find how to do it. (in swift)
Any idea ?
Here is a gif to give you a better idea :) http://gfycat.com/WarmUglyAppaloosa
I finally found the solution in this post which has a different goal but work in my case too ! https://stackoverflow.com/a/21048603/5164509
Hi I am getting this error on my code, I have no clue how to fix it .
Suggestions and answers would be awesome. Thanks :D
The correct syntax would be:
editViewController.chosenImage.image = self.Image
Very much understood from the error that you are pointing UIImage to UIImageview that is not compatible. So You need to use the property image of UIImageview as follows:
[editViewController.chosenImage setImage:self.Image];
All the other answers are correct but it's worth explaining that UIImage is just an object. It is a direct subclass of NSObject. UIImageView is a view (subclass of UIView) that takes a UIImage as one of its properties and displays it.
As you can see in the screenshot below, the NSCollectionView I used has some kind of border (the thin gray lines) I want to get rid of. Can somebody tell me how to achieve this? I already tried subclassing the NSCollectionView and tried to overwrite it in the drawRect: by using [[super layer] setBorderWidth:0.0f]; but this did not work.
Searching on Google, SO and the Apple Documentation did not help either. So did anyone achieved this already or knows where I can find an example of how to do it?
Thanks in advance,
Björn
The collectionView is nested in a NSScrollView, which has a borderType property.
You can get rid of the border by simply setting its border type to NSNoBorder.
self.collectionView.enclosingScrollView.borderType = NSNoBorder;
From story board:
Select the scroll view from story board
Then choose no boarder from Attributes Inspector
For Swift 3 :-
collectionView.enclosingScrollView?.borderType = .noBorder
I am trying to customize an IKImageBrowserCell to have something close to the Finder.
For the moment my issue is to have a title in 2 lines. Do you have any experience of what need to be modified in order to achieve this?
Thanks and regards,
Yes, this is possible by drawing your title on a CALayer returned from the - (CALayer *)layerForType:(NSString *)type method of a subclassed IKImageBrowserCell.
See my answer here.