Change dots of UIPageControl from a ChildViewController in a ParentViewController - swift - xcode

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

Related

Custom view for swift

I want to make an view that looks like a wall in swift 3.
Here is an example:
Every entry should look like a square with some information.
Is there any framework which I can use or do someone know a solution for that?
I can't comment because of reputation issue. You can use UICollectionView if every entry has same width and height.Here is a tutorial https://www.raywenderlich.com/136159/uicollectionview-tutorial-getting-started.
If not, you can create subviews using UIView with your desired UI components.

Which Cocoa Animated NSView Subclass is it?

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 !

incompatible pointer types assigning to 'UIImageView*' from 'UIImage*'

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.

Remove border from NSScrollView/NSCollectionView

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

Finder like IKImageBrowserCell

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.

Resources