Introduction
Welcome to the CustomBadge documentation! Here you will find details on how to use CustomBadge, a library that allows you to easily create custom badges in your iOS applications.
Installation
CustomBadge can be installed using CocoaPods. If you don’t have CocoaPods installed, refer to the CocoaPods documentation for detailed installation instructions.
source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'
target 'YourProjectName' do
use_frameworks!
pod 'CustomBadge', '~> 1.0'
end
Usage
To get started with CustomBadge, follow the steps below:
- Import the CustomBadge module in your Swift file:
import CustomBadge
- Create a new instance of CustomBadge:
let badge = CustomBadge()
- Customize the appearance of the badge using the available properties:
badge.textColor = .white
badge.backgroundColor = .red
badge.borderWidth = 2.0
badge.borderColor = .black
badge.font = UIFont.systemFont(ofSize: 12, weight: .bold)
- Create a badge view and add it to your desired view:
let badgeView = badge.createView()
view.addSubview(badgeView)
Contributing
If you want to contribute to CustomBadge, please follow the contribution guidelines.
License
CustomBadge is available under the MIT license. See LICENSE for more information.