ProfileImageView IntrinsicContentSize
Twitter Slide Out Menu
Let's go ahead and further flesh out the Twitter Slide Out menu in our application in this lesson. We'll be looking at how to include a circular ProfileImageView into our header. I'll also discuss some nice tricks for cleaning up our UIStackView code. One of the keys to customizing your designs is to take advantage of the instrinsicContentSize property of your views.

Comments (5)
Alex de Koning
4 years ago
Hi Brian, How would one accomplish placing the profileImageView in the center of the menuview instead of pushing it to the leftside with the UIView()? Thanks in advance.
Steven Verheyen
4 years ago
I am also interested in how to do this one. If I try to get the image of a certain size and rounded, the StackView does not seem to keep this size into account whenever I do not use another UIView to fill up the space.
Brian Voong
4 years ago
ZpecterZ80
4 years ago
Hi Brian, The problems with the image literals seems to be solve on Xcode 10.1 that was released a few days ago.
Huo En Ci
4 years ago
Hi Brian, instead of using a custom imageView to specify a height, I think it might be better to just add auto layout constraints instead?
Brian Voong
4 years ago
mustii
4 years ago
Hey Brian, why didn't you use the following `stackView.alignment = .leading` instead of actually added a stackView into the stackView again `UIStackView(arrangedSubViews: [profileImageView, rightSpacerView])
Brian Voong
4 years ago
Alija Sirbic
4 years ago
Hi Brian, I created a StretchyHeader Layout from your tutorial but in the Header i created another collectionview with horizontal scrolling for images. Now when scrolling the main collectionview vertically the header is only stretching the horizontal collectionview and not the cells with images inside. So the images are not stretching. How can I fix this?
HELP & SUPPORT