You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letitems=[FAQItem(question:"What is reddit?", answer:"reddit is a source for what's new and popular on the web."),FAQItem(question:"How is a submission's score determined?", answer:"A submission's score is simply the number of upvotes minus the number of downvotes.")]letfaqView=FAQView(frame: view.frame, title:"Top Queries", items: items)
view.addSubview(faqView)
Attributed text answers
You may use attributed text instead of plain text. Set the attributedAnswer property of items to an NSAttributedString.
Customization
// Question text color
faqView.questionTextColor =UIColor.blue
// Answer text color
faqView.answerTextColor =UIColor.blue
// Question text font
faqView.questionTextFont =UIFont(name:"HelveticaNeue-Light", size:15)
// View background color
faqView.viewBackgroundColor =UIColor.white
// Set up data detectors for automatic detection of links, phone numbers, etc., contained within the answer text.
faqView.dataDetectorTypes =[.phoneNumber,.calendarEvent,.link]
// Set color for links and detected data
faqView.tintColor =UIColor.red
// Set Layout position .left or .right
faqView.positionType =.left