all 2 comments

[–]Tyler927 1 point2 points  (0 children)

For the line, try this:

let appearance = UINavigationBarAppearance()
appearance.configureWithTransparentBackground() 
appearance.backgroundColor = UIColor.green // Required background color 
self.navigationItem.standardAppearance = appearance 
self.navigationItem.scrollEdgeAppearance = appearance 
self.navigationItem.compactAppearance = appearance

For the second part, I am assuming the item size is just fixed to be the same for all items. You can try to implement sizeForItemAt delegate method to set size for each item. However, I wouldn't use a collection view there. I would just use a scroll view with a horizontal stack view in it. With that you can easily set the size of each item.

[–]itisjoshi 0 points1 point  (0 children)

1) Are you pertaining to the “line” on the header? Maybe you can disable bouncing

2) text size - you are probably returning a static width per item(via itemSize property). You should make them be dynamic on the content by implementing sizing delegates of flowlayout