Post

Replies

Boosts

Views

Activity

Text like PlaceHolder
Hi I have a textField to provide Date for Birth(Requirement). Initially the textField should have the text "DD MM YYYY" . And if I key in the date of birth, need to remove characters (DD MM YYYY) one by one. Scenario: DD MM YYYY is the text displayed in TextField initially. After typing first digit(for example 3), it should be like " 3D MM YYYY " After typing second digit(for example 1, it should be like " 31 MM YYYY " After typing third digit(for example 0, it should be like " 31 0M YYYY " After typing fourth digit(for example 8, it should be like " 31 08 YYYY " and so on.... Is this possible?
3
0
1.5k
Aug ’21
How to remove the extra white space?
Hi,My Code SnippetmyTextView.heightAnchor.constraint(greaterThanOrEqualToConstant: 20).isActive = truelet myHTMLString =" some html text" myTextView.attributedText = myHTMLString.htmlToAttributedStringextension String { var htmlToAttributedString: NSAttributedString? { guard let data = data(using: .utf8) else { return NSAttributedString() } do { return try NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .characterEncoding:String.Encoding.utf8.rawValue], documentAttributes: nil) } catch { return NSAttributedString() } } var htmlToString: String { return htmlToAttributedString?.string ?? "" } }HTMLString converted to attributed string.But,extra lines of white spaces exists in myTextView at the bottom.What is the reason?How to recitify it?Thanks In Advance
3
0
2.1k
Feb ’20