## Welcome to YYKit Documentation
YYKit is a powerful set of utility and component libraries for iOS development. It provides a range of features and tools that make it easier to build cutting-edge iOS applications.
### Installation
To start using YYKit in your iOS project, you need to follow these steps:
#### CocoaPods
1. Open your Terminal and navigate to your project’s root directory.
2. Run the following command to create a `Podfile` if you don’t have one already:
“`shell
$ pod init
“`
3. Open the `Podfile` and add the following line to your target section:
“`ruby
pod ‘YYKit’
“`
4. Save the `Podfile` and run the following command:
“`shell
$ pod install
“`
5. Close your project, and instead open the `.xcworkspace` file.
#### Carthage
If you prefer using Carthage, follow these steps:
1. Open your Terminal and navigate to your project’s root directory.
2. Run the following command:
“`shell
$ touch Cartfile
“`
3. Open `Cartfile` and add the following line:
“`shell
github “ibireme/YYKit”
“`
4. Save the `Cartfile` and run the following command:
“`shell
$ carthage update –platform iOS
“`
5. In your Xcode project, select your target and navigate to `Build Phases`.
6. Add a new `Run Script Phase` by clicking the `+` button.
7. Add the following command:
“`shell
/usr/local/bin/carthage copy-frameworks
“`
8. In the `Input Files` section, add the following paths:
“`shell
$(SRCROOT)/Carthage/Build/iOS/YYKit.framework
“`
9. Build your project.
### Usage
#### Importing
To use YYKit in your code, you need to import the necessary modules:
“`swift
import YYKit
“`
#### Examples
Here are some examples of how you can use the features provided by YYKit:
**1. Asynchronous Image Loading**
“`swift
imageView.yy_setImage(with: URL(string: “http://example.com/image.jpg”))
“`
**2. JSON Serialization**
“`swift
let jsonString = “{\”name\”: \”John\”, \”age\”: 25}”
let json = jsonString.yy_modelDictionary()
“`
**3. Text Attributes**
“`swift
let text = NSMutableAttributedString(string: “Hello, world!”)
text.yy_font = UIFont.boldSystemFont(ofSize: 16)
text.yy_color = UIColor.red
“`
**4. Image Processing**
“`swift
let resizedImage = image.yy_imageByResize(to: CGSize(width: 100, height: 100))
“`
### Resources
Here are some additional resources to help you get started with YYKit:
– [GitHub Repository](https://github.com/ibireme/YYKit): Explore the complete source code and examples.
– [API Reference](https://cocoadocs.org/docsets/YYKit/): Browse the detailed API documentation.
– [Forum](https://github.com/ibireme/YYKit/discussions): Join the community and ask questions.
– [GitHub Issues](https://github.com/ibireme/YYKit/issues): Report any bugs or suggest improvements.
### License
YYKit is released under the MIT license. See the [LICENSE](https://github.com/ibireme/YYKit/blob/master/LICENSE) file for more information.