toast-swift icon indicating copy to clipboard operation
toast-swift copied to clipboard

Number of lines option

Open efehelvaci opened this issue 1 year ago • 4 comments

It truncates the texts when they are too long. It would be good if we can set the number of lines in the config. Also, minimum scale factor can be useful too.

Especially needed when you don't use a subtitle but a long title.

Screenshot 2023-08-11 at 21 30 01

efehelvaci avatar Aug 11 '23 18:08 efehelvaci

Any updates?

mehulparmar4ever avatar Nov 07 '23 05:11 mehulparmar4ever

Have you tried Configuration to set number of lines in title and subtitle? default is 1 but you can modify it

joshid avatar Nov 08 '23 18:11 joshid

how to add numberOfLines in ToastConfiguration?

AbdelrahmanShehab avatar Dec 09 '23 17:12 AbdelrahmanShehab

Number of lines is natively supported:

let toast = Toast.text("Safari pasted from Notes", viewConfig: .init(
    titleNumberOfLines: 2,
    subtitleNumberOfLines: 3
))
toast.show()

BastiaanJansen avatar Dec 09 '23 17:12 BastiaanJansen