1.0.0 - 2020/01/17 - Initial release
Swift 4.0 or above
iOS 8.0 or above
This module extends UIView with utility methods. This is a required module for many other Swift HK modules.
Use one of the following methods:
The module is avabilable via CocoaPods Trunk. Below is an example podfile. If you already use a podfile for your project, all you have to do is add the line that specifies HKUIViewUtilities
. The other dependencies will also be automatically installed in the xcworkspace.
platform :ios, '11.0'
target 'MyTarget' do
use_frameworks!
pod 'HKUIViewUtilities', '~> 1.0.0'
# other pods for your project
end
Don't forget to import the module in your source code:
import HKUIViewUtilities
You can also simply include the following source files in your project:
HKUIViewUtilities.swift
All the methods can be called by any descendants of UIView. Public methods can be called by any code in the project.
Returns the minimum box size that will fit all the subviews.
Returns true if the width > height. Otherwise, returns false.
Returns true if the width <= height. Otherwise, returns false.
Returns the width if width > height. Otherwise, return the height.
Returns the height if width <= height. Otherwise, return the width.
There are no known issues currently.