Hi,How to create attributed String with rounded label in it?Sample Image:
Post
Replies
Boosts
Views
Activity
Hi,How to align an image and string of an attributed String to vertical center?I attached an image by using NSTextAttachment()And i appended a string.The alignment of the image and the string looks like below: π GoodNoonHow to align the string to be vertically center to the image?
Hi,My Code to get Local Time From UTC:func getLocalTimeFromUTC(dateString: String) -> (String,String){ let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" dateFormatter.timeZone = TimeZone(abbreviation: "UTC") let dt = dateFormatter.date(from: dateString) dateFormatter.timeZone = TimeZone.current dateFormatter.dateFormat = "dd/MM/yyyy HH:mm:ss" let finalDate = dateFormatter.string(from: dt!) let finalDateArr = finalDate.components(separatedBy: " ") return (finalDateArr[0] , finalDateArr[1]) }If the time format is 24 hours in my iPhone, no problem in the above code.But when i change the time format from 24 hours to 12 hours in my iPhone, dt is nil.How to handle this?
Hi, I used below code for UITextField Keyboard Type.sampleTextField.keyboardType = .decimalPadIn the keyborad displayed,how to add % key ?Thanks
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
Hi,
In my objectiveC project ,i tried to use swift.
so I added a swift file in my objectiveC project.
accepted to add bridging file.
Once i use "#import "ProductModuleName-Swift.h" in objectiveC file, and build the project, i am getting error "#pragma clang attribute pop' with no matching '#pragma clang attribute push'".
Why this error?
How to fix?
Hi,
My project is in Objective C.
Is it possible to add new swift viewController in objective C Project?
Hi,
Is the date Format "dd.mm.yyyy" available?
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?
I don't know whether it is right to post this question here.
I am trying to integrating Razorpay in my iOS app.
Is there iOS custom SDK for Razorpay?
Please suggest me if there is any Custom SDK for iOS Razorpay integration or any other option for the same.
Thank you
How do I write Regular Expression to validate FirstName for Japanese Language in swift?
Is it possible to detect an object when it is placed on the display of the iPhone device?