Welcome to the Treehouse Community
Looking to learn something new?
UIButton not showing on UICollectionViewController
I added a storyboard to the Photo Bomber app project. On that storyboard, I added a view controller and I associated it with an existing UICollectionViewController subclass that is the target scene for that view.
On that view controller, I added a UIButton by dragging it and dropping it. I also created a segue to another view controller originating from that UIButton.
I run my app and the build succeeds.
However, when I get to the view controller where I added the UIButton, I do not see the UIButton in the place I had inserted it in the storyboard. Actually, I cannot see any UIButton at all, it doesn't appears anywhere on that view.
What am I doing wrong?
Help from more experienced developers appreciated.
Not sure I follow exactly what you're doing, but here's a small thing to check.
In the Project Navigator click on your storyboard to open Interface Builder.
In Interface Builder, locate the button of concern in the Document Outline to the left.
Check if there other views above the button in the view hierarchy that might be obstructing the view of the button.
Hi Fred: I just sent you a LinkedIn invite. Maybe we could explore synergies. We seem to have quite a few interests in common. My LI profile doesn't show the latest stuff I am working on (nothing to do with the iOS learning I am looking to acquire here).
Here is a screen shot of my storyboard with the button I added: https://www.dropbox.com/s/hzbgjubdvculuy4/storyboard_UICollectionView.png
As you can see, the button "Done" seems to have a lower rank in the stack of views (I imagine) as the view where I dragged and dropped it. I tried to drag and drop it somewhere else in the left column to remedy that. Nothing worked so far.
I am in the process of learning iOS coding so I am sure there is an easy fix for someone with some more experience.
Looking forward to connecting.
Kind regards, Arsene