Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mukeshthawani/faqview
An easy to use FAQ view for iOS written in Swift
https://github.com/mukeshthawani/faqview
cocoapods ios swift swift-3 swift4 ui-components
Last synced: about 1 month ago
JSON representation
An easy to use FAQ view for iOS written in Swift
- Host: GitHub
- URL: https://github.com/mukeshthawani/faqview
- Owner: mukeshthawani
- License: mit
- Created: 2016-12-01T03:59:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T09:40:17.000Z (over 2 years ago)
- Last Synced: 2024-11-13T06:08:20.114Z (about 1 month ago)
- Topics: cocoapods, ios, swift, swift-3, swift4, ui-components
- Language: Swift
- Homepage:
- Size: 1.74 MB
- Stars: 473
- Watchers: 15
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- fucking-awesome-swift - FAQView - An easy to use FAQ view for iOS. (Libs / UI)
- awesome-swift - FAQView - An easy to use FAQ view for iOS. (Libs / UI)
- awesome-swift - FAQView - An easy to use FAQ view for iOS written in Swift ` 📝 a year ago ` (UI [🔝](#readme))
- awesome-swift - FAQView - An easy to use FAQ view for iOS. (Libs / UI)
README
# FAQView
# An easy to use FAQ view for iOS written in Swift.
* This view is a subclass of UIView.
## Screenshots:
## Setup with CocoaPods
If you are using CocoaPods add this text to your Podfile
and run `pod install`.use_frameworks!
target 'Your target name'
pod 'FAQView', '~> 0.7.0'## Or Add source
Simply add
[FAQView.swift](https://github.com/mukeshthawani/FAQView/blob/master/Source/FAQView.swift) file to you project.## Usage
### Creating a view from the code
```Swift
let items = [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.")]let faqView = FAQView(frame: view.frame, title: "Top Queries", items: items)
view.addSubview(faqView)
```
#### Attributed text answersYou may use attributed text instead of plain text. Set the ```attributedAnswer``` property of items to an NSAttributedString.
#### Customization
```Swift
// 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```
## Requirements
- Swift 5.0+
- Xcode 13.0+
- FAQView 0.4.x is compatible with Swift 3
- iOS 9.0+## Author
[Mukesh Thawani](http://twitter.com/MukeshThawani)
## Contributing
Feature requests, bug reports, and pull requests are all welcome.
## License
Copyright (c) 2016-present Mukesh Thawani. Release under the [MIT License](License).