|
Hello, I have finished all the requirments for this chanllenge, however, I'm struggling with how to add spacing between uitableview cells. All my cell rows are bunched up together with no breathing room between the associated images and texts. |
|
Hello, I strongly believe that in order to set the cell insets for the image, you would have to create a custom cell class. So, what I recommend to do now is to separate the flag images by adding borders to them. In
Now it should look better. Once you reach the days where you learn about custom classes, you can go back to this project and improve it, using the technique from this video: https://www.youtube.com/watch?v=Xm9jaqiUiTA. Cheers! |
|
@MateusZ that was really helpful, but i was wondering about how to set border as well in the detail view controller to sarround the flags. i tried to set the broder to the image view itself but it was always far away and not sarrounding the flag itself. |
|
Simply say using insets, but it is kind of tricky for default cell, prefer to use custom cell to do it. See this thread https://stackoverflow.com/questions/6216839/how-to-add-spacing-between-uitableviewcell/36060215#comment113478925_36060215 @sugertag Try to set imageView's aspect ratio to 2:1 in storyboard. Or set its constraint programmtically.
|
|
Thanks @mateuz! I'm working on https://thexploretech.com/internet-download-manager-serial-number/ and I was facing same problem. Thanks for sharing your experience regarding this issue. Regards. |
|
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.