sqrline/HoneyKit 1.1.0
HoneyKit is extensions for solve common tasks in iOS development
⭐️ 3
🕓 2 years ago
iOS
.package(url: "https://github.com/sqrline/HoneyKit.git", from: "1.1.0")
🍯 HoneyKit
HoneyKit
is extensions for solve common tasks in iOS development
🛠 Install
CocoaPods
For integrate HoneyKit
into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!
target '<Your Target Name>' do
pod 'HoneyKit', '~> 1.1.0'
end
Then, run the following terminal command in project directory:
$ pod install
Swift Package Manager
For use The Swift Package Manager you need add HoneyKit
dependency to Package.swift
file:
import PackageDescription
let package = Package(
name: "PROJECT_NAME",
targets: [],
dependencies: [
.package(url: "https://github.com/sqrline/HoneyKit.git", from: "1.1.0")
]
)
Then add HoneyKit
to your targets dependencies:
.target(
name: "TARGET_NAME",
dependencies: [
"HoneyKit",
]
),
And run terminal command:
swift package update
⚡️ List of extensions
Swift
Collection
- IsNotEmpty. Indicating whether the collection is not empty.
- SafeSubscript. Returns the element at the specified index if it is within bounds, otherwise nil.
String
- HTML. Converts html to an NSAttributedString with system iOS font.
- Localized. Returns an localized version of the string.
Foundation
Date
- DayStep. Returns date after adding step to exists date based on direction.
- DaysMonth. Returns start/end day of month.
- DaysWeek. Returns start/end day of week.
UIKit
UIAlertController
UIBarButtonItem
- Badge. Shows notification badge on bar button.
UIButton
- LoadingIndicator. Shows/hides activity indicator in button for indicate loading process.
- SetTitle. Sets title with animation.
UICollectionView
- RegisterCell. Registers a cell by class or nib for use in creating new collection cells.
- ReusableCell. Returns a reusable collection view cell object by class with index path.
UIColor
- Hex. Conveniece init color from hex string.
UIView
- ActivityIndicator. Adds/hides container with activity indicator in view.
- AddSubview. Adds view with all sides constraints for filling into superview.
- HideKeyboard. Hides keyboard if tap on current view's area.
- InitFromXib. Instantiates view from xib.
- RemoveSubview. Removes all subviews from current view.
- Shadow. Drops shadow from the current view.
UITableView
- RegisterCell. Registers a cell by class or nib for use in creating new table cells.
- ReusableCell. Returns a reusable table view cell object by class.
UIViewController
- Child. Handles (adds, removes and switches) child of the current view controller.
🖥 Contributing
Your contributions are always welcome! For add’s new extension submit a pull request. See CONTRIBUTING.md for guidelines.
🖖 Authors
Vladimir Pchelyakov
Aleksey Pleshkov
©️ License
HoneyKit
is released under the MIT license. In short, it's royalty-free but you must keep the copyright notice in your code or software distribution.