## FolioreaderKit Documentation
### Introduction
Welcome to the FolioreaderKit documentation. This comprehensive guide will walk you through the functionalities and features of FolioreaderKit, a powerful framework for creating immersive reading experiences in your iOS applications.
### Installation
To begin using FolioreaderKit in your iOS project, follow the steps below:
#### Step 1: Cocoapods Installation
FolioreaderKit can be easily integrated using Cocoapods. Open your project’s Podfile and add the following line:
“`ruby
pod ‘FolioReaderKit’
“`
Save the file and run the command `pod install` from the terminal. This will fetch the FolioreaderKit library and integrate it into your project.
#### Step 2: Manual Installation
Alternatively, you can also install FolioreaderKit manually. Follow these steps:
1. Download the latest release of FolioreaderKit from the official GitHub repository.
2. Extract the downloaded file and locate the `FolioReaderKit.framework` folder.
3. Drag and drop the `FolioReaderKit.framework` folder into your Xcode project’s `Frameworks` folder.
### Getting Started
Once the installation is complete, you can begin using FolioreaderKit in your iOS application. Follow the steps below to get started:
#### Step 1: Import FolioreaderKit
In the view controller where you want to use FolioreaderKit, add the following import statement:
“`swift
import FolioReaderKit
“`
#### Step 2: Initialize FolioreaderKit
To initialize FolioreaderKit, create an instance of `FolioReaderContainer` in your view controller. This container manages the reader workflow and provides various customization options.
“`swift
let readerConfig = FolioReaderConfig(withIdentifier: “FolioreaderKit”)
let folioReader = FolioReaderContainer(config: readerConfig, epubPath: “path/to/your/book.epub”)
“`
Ensure to replace `”path/to/your/book.epub”` with the actual path to your EPUB file.
#### Step 3: Present the Reader
To present the FolioreaderKit view, call the `present(_:animated:completion:)` method on the view controller:
“`swift
present(folioReader, animated: true, completion: nil)
“`
### Customization
FolioreaderKit provides various customization options to tailor the reading experience according to your application’s requirements. Here are a few key customization options:
#### Background Color
You can modify the background color of the reader view for a personalized touch. To customize the background color, use the `readerConfig` instance:
“`swift
readerConfig.backgroundColor = .white
“`
Replace `.white` with your desired color.
#### Font Settings
FolioreaderKit enables users to adjust font settings for better readability. To modify the font settings, use the `readerConfig` instance:
“`swift
readerConfig.canChangeFontStyle = true
readerConfig.canChangeFontSize = true
readerConfig.canChangeFont = true
“`
These properties enable users to choose different font styles, font sizes, and fonts within the reader interface.
#### Search
FolioreaderKit includes a search functionality to enable users to search for specific text within the book. To enable this feature, use the `readerConfig` instance:
“`swift
readerConfig.shouldHideNavigationOnTap = false
“`
Setting `shouldHideNavigationOnTap` to `false` allows the search functionality to remain accessible at all times.
### Advanced Usage
If you require further customization or advanced usage scenarios, FolioreaderKit offers a wide range of APIs and delegate methods. Please refer to the official [FolioreaderKit documentation](https://github.com/FolioReader/FolioReaderKit/wiki) for detailed information on available options and functionalities.
### Conclusion
This concludes the FolioreaderKit documentation. You should now have a good understanding of how to integrate FolioreaderKit into your iOS application and utilize its various features for a rich reading experience. Enjoy building immersive reading apps with FolioreaderKit!