I am making an app where I need text to display directly above a UIImage. When the text is too wide to fit, I need it to display on 2 rows of text, with the bottom one being at the same position vertically as if it only had one row. If the text cannot fit in two rows, I want it to get smaller so that it will just fit in the two rows. Below is an image showing what I mean.
            Asked
            
        
        
            Active
            
        
            Viewed 110 times
        
    0
            
            
        - 
                    add current code you are using, normally setting numberOfLines on UILabel is enough – Grzegorz Krukowski Aug 04 '18 at 21:11
- 
                    See this link https://stackoverflow.com/questions/4201959/label-under-image-in-uibutton – Grigory S Shushakov Aug 04 '18 at 23:55
1 Answers
0
            Label constraints : top to superview , leading & trailing & bottom to imageView ,,, with .lines = 2 , textAlignment = .center
ImageView constraints : centerX , width , height
 
    
    
        Shehata Gamal
        
- 98,760
- 8
- 65
- 87
