## Overview
Welcome to the documentation for the **ntycsvtable** framework! This guide will provide you with detailed information on how to get started, use various features, and customize the framework to suit your needs. **ntycsvtable** is a powerful library that enables you to work with CSV data in your iOS projects, allowing seamless integration and manipulation of tabular data.
## Installation
To get started with **ntycsvtable**, you’ll need to follow these steps:
1. **Step 1:** Install the framework
– **Option 1:** Cocoapods
1. Add `pod ‘ntycsvtable’` to your Podfile
2. Run `pod install` to integrate the framework into your project
– **Option 2:** Manual Installation
1. Download the latest framework release from the [GitHub repository](https://github.com/ntysoc/ntycsvtable)
2. Drag and drop the framework into your Xcode project
2. **Step 2:** Import the framework
– Add `import ntycsvtable` to the files where you plan to use **ntycsvtable**
## Usage
**ntycsvtable** offers a wide range of functions to efficiently work with CSV data. Below, we’ll cover the most common use cases:
#### Load CSV Data
To load CSV data, start by creating an instance of `CSVTable`:
“`swift
let csvTable = CSVTable()
“`
Next, you can use the `loadCSV` method to load your CSV file. Provide the file URL as a parameter:
“`swift
csvTable.loadCSV(from: fileURL)
“`
#### Accessing Rows and Columns
You can access data within **ntycsvtable** using row and column indices. The first row and column are index 0:
“`swift
let dataAtRow0Column3 = csvTable.data[row: 0, column: 3]
let allDataInColumn2 = csvTable.data[column: 2]
“`
#### Modifying Data
To modify data within **ntycsvtable**, you can directly set values at a specific row and column index:
“`swift
csvTable.data[row: 2, column: 1] = “New Value”
“`
#### Data Analysis
**ntycsvtable** also allows you to perform several data analysis operations, such as calculating the sum, average, or maximum value of a specific column:
“`swift
let sumOfColumn3 = csvTable.calculateSum(ofColumn: 3)
let averageOfColumn1 = csvTable.calculateAverage(ofColumn: 1)
let maxOfColumn4 = csvTable.calculateMaximum(ofColumn: 4)
“`
The framework provides additional powerful features to work with data such as sorting, filtering, aggregating, and more. Refer to the official documentation and examples for more advanced usage.
## Customization
### Styling
You can customize the appearance of the **ntycsvtable** framework to match your application’s design. Styling options include:
– Font size and color
– Background color
– Table border style
– Row and column separator style
You can refer to the official documentation for detailed instructions and code examples on how to customize the appearance of your table.
### Custom CSV Parsing
If you require custom parsing logic, you can implement your own CSV parser by conforming to the `CSVParser` protocol. Implement the necessary methods to handle specific parsing requirements and use your custom parser with the **ntycsvtable** framework.
## Conclusion
Congratulations! You should now have a good understanding of how to use and customize the **ntycsvtable** framework. If you have any further questions or need assistance, please refer to the official documentation or reach out to our community forums for support.
We hope you find **ntycsvtable** helpful and enjoy working with it!
**ntycsvtable** – Making CSV data management in iOS a breeze.