peterprokop / SwiftOverlays

SwiftOverlays is a Swift GUI library for displaying various popups and notifications
MIT License
631 stars 83 forks source link

Add width constraints to avoid cropped text #49

Open Dekwin opened 6 years ago

Dekwin commented 6 years ago

I use method SwiftOverlays.showBlockingWaitOverlayWithText("example. many words ...")

If the string argument contains a several sentences ( > 8-10 words) the width will be more than the width of the screen (iPhone 5s for e.g.) So, we need width constraints.

If we have universal app, the solution below is not suitable.(because we need different strings for ipad(without \n) and iphone)

// Overlay with text only
let text = "This is a text-only overlay...\n...spanning several lines"
self.showTextOverlay(text)