DKCategories
Welcome to DKCategories, a powerful collection of useful categories and extensions for Objective-C and Swift. This library aims to enhance your development workflow by providing additional functionalities and extensions to complement Apple’s frameworks.
Installation
- Open your Xcode project.
- Click on “File” in the menu bar.
- Select “Swift Packages” and then “Add Package Dependency”.
- Enter the following repository URL: https://github.com/dkhamsing/DKCategories.
- Choose the latest release version.
- Click on “Next” and then “Finish”.
Usage
To use DKCategories in your project, follow these steps:
- Import the library:
Swift:import DKCategories
Objective-C:#import <DKCategories/DKCategories.h>
- Start using the available categories and extensions in your code.
Available Categories
UIColor+DKCategories
This category provides additional functionalities for UIColor, including:
- Converting hex color values to UIColor objects.
- Generating random colors.
- Creating gradients with multiple colors.
- And more!
NSString+DKCategories
This category provides helpful functions and extensions for NSString, including:
- Checking if a string is empty or contains only whitespace.
- Trimming whitespace and newlines.
- Converting a string to lowercase or uppercase.
- And more!
NSDate+DKCategories
This category adds useful methods and properties to NSDate, making working with dates much easier. Functions include:
- Getting the first day of a month.
- Checking if a given date is today, tomorrow, or yesterday.
- Calculating the difference between two dates in days, weeks, or months.
- And more!
Contributions
If you would like to contribute to DKCategories, please follow these guidelines:
- Fork the main repository on GitHub.
- Create a new branch for your changes.
- Make your modifications and write tests if applicable.
- Submit a pull request with a clear description of your changes.
Contact
If you have any questions or suggestions, feel free to reach out via email at [email protected]