Step 1) Break a string up into lines. You have to know the width of your target view. view.bounds.width will do.
See link Question to show you how to break up the text into lines. Pay attention to the question not the answer although that will be part of the answer on the next step.
Step 2) Ditch UILabel. Use UITextView at the very least. Apple changed UILabel to pull down orphan words so even if you get the lines right, a UILabel may not give you the look of what you are doing since it could pull a word down. Use a UITextView and disable scroll, editing disabled, and possibly selection disabled. That will give you intrinsic size to lay it out like a UILabel.
Step 3) Use attributed String to add the backgroundColor/highlighting you seek or use multiple UITextViews(possibly with a UIStackView) or CATextLayers with manual layout to divide your lines up in their own view or layer with the spacing you desire and just use the backgroundColor property. That's up to you. I don't know what you are after.
Sorry I did not show you exactly and only pieced together snippets but this is how you do it. Cheers