BaseClasses 6.0.0

BaseClasses 6.0.0

LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2021
SPMSupports SPM

Maintained by Anton Plebanovich.

  • By
  • Anton Plebanovich


Carthage compatible Swift Package Manager compatible Version License Platform CI Status

Default configuration for some UI classes through inheritance.


To run the example project, clone the repo, and run pod install from the Example directory first.


Please check official guide


github "APUtils/BaseClasses" ~> 6.0

Install command: carthage bootstrap --use-xcframeworks


BaseClasses is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BaseClasses', '~> 6.0'

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding ViewState as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "", .upToNextMajor(from: "6.0.0"))


See example project for more details.

Just set your class in storyboard and you are done.

Alternatively you could inherit your custom class from BaseClasses class:

import UIKit
import BaseClasses

class NavigationController: BaseClasses.NavigationController {}

ScrollView, TableView, CollectionView

Those classes provide decreased button highlight animation


Collection view that resizes it's cells to be the same size as collection view

Example usage together with StretchScrollView:


Makes touches go through. Useful when it's transparent so user could interact through it.


Allows child viewControllers specific status bar configuration. UINavigationController doesn't pay attention to its childs setting.

Just override preferredStatusBarStyle in your custom view controller to configure status bar style for your screen:

override var preferredStatusBarStyle: UIStatusBarStyle {
    return .default


Preventing backgroud color change for views in selected and highlighted state


TextField with Done default button and close keyboard when tap


Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.


Anton Plebanovich, [email protected]


BaseClasses is available under the MIT license. See the LICENSE file for more info.