BothamUI alternatives and similar libraries
Based on the "UI" category.
Alternatively, view BothamUI alternatives based on common mentions on social networks and blogs.
-
DZNEmptyDataSet
DISCONTINUED. A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display -
IQKeyboardManager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. -
animated-tab-bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
SkeletonView
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting -
TTTAttributedLabel
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more -
MGSwipeTableCell
An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions. -
SWTableViewCell
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application) -
JVFloatLabeledTextField
UITextField subclass with floating labels - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
Alerts & Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
TPKeyboardAvoiding
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS -
PageMenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
XLForm
XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C. -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
CSStickyHeaderFlowLayout
UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7. -
Material Components
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
SWRevealViewController
A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right ! -
expanding-collection
:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of BothamUI or a related project?
README
BothamUI

BothamUI is MVP (Model-View-Presenter) framework written in Swift.
This project will help you setup all your presentation logic. BothamUI provides classes to represent the main components of this pattern like BothamViewController
and BothamPresenter
.
In addition we will use a wireframe navigation model and a service locator example[[5] [di]].
Screenshots
[Screenshot1][screenshot1]
Application UI/UX designs by Luis Herrero.
Data provided by Marvel. © 2015 MARVEL
Usage
This framework contains all the classes needed to implement your presentation logic following the MVP pattern. To use the view package, make your ViewController
extend from Botham ViewController
and specify in the storyboard wich class and Storyboard ID is linked to:
import BothamUI
class SampleViewController: BothamViewController {
/*...*/
}
Storyboard
BothamStoryboard
provide a series of methods to help you instantiate view controllers by there storyboard ID. By default instantiateViewController()
will search for view controller with the storyboard ID with the same name as the class.
import BothamUI
let mainStoryboard = BothamStoryboard(name: "Main")
let viewController: SampleViewController = mainStoryboard.instantiateViewController("SampleViewController")
let viewController: SampleViewController = mainStoryboard.instantiateViewController()
Presenter
To follow the MVP pattern, BothamUI also provides a BothamPresenter
protocol that will be responsible for all your presentation logic. BothamUI will take care of linking your view (a BothamViewController
) with your presenter and subscribing it to its lifecycle. In order to do that, create a class that implement BothamPresenter
and link it to your view:
import BothamUI
class SamplePresenter: BothamPresenter {
private weak var ui: SampleUI?
init(ui: CharacterDetailUI) {
self.ui = ui
}
func viewDidLoad() {
/* ... */
}
}
protocol SampleUI: BothamUI {
/* ... */
}
class SampleViewController: BothamViewController, SampleUI {
/*...*/
}
Dependency injection
BothamUI is built around the concept of dependency injection, all the dependencies are provided by constructor or properties, base on what UIKit allows us.
ViewController Instantiation
In the example a Service Locator is used in order to instantiate view controllers, but you can also use Swinject or others DI frameworks.
class ServiceLocator {
static let sharedInstance = ServiceLocator()
func provideSampleViewController() -> SampleViewController {
let viewController: SampleViewController = provideMainStoryboard().viewController()
viewController.presenter = SamplePresenter(ui: viewController)
return viewController
}
}
Lifecycle
Once both, view and presenter, are linked you can react to your view lifecycle directly from the presenter. You will be also able to call your view easily from the presenter:
class SamplePresenter: BothamPresenter {
private weak var ui: SampleUI?
init(ui: CharacterDetailUI) {
self.ui = ui
}
func viewDidLoad() {
self.ui?.showMessage("Welcome to Botham")
}
}
To understand when the lifecycle methods are called take a look at the following table:
BothamPresenter | UIViewController |
---|---|
viewDidLoad |
viewDidLoad |
viewWillAppear |
viewWillAppear |
viewDidAppear |
viewDidAppear |
viewWillDisappear |
viewWillDisappear |
viewDidDisappear |
viewDidDisappear |
Caveats
- ViewControllers instantiated view UIStoryboard, can't reference Generic Type.
- Presenter and ViewController have a circular reference (like a ViewController and Datasource).
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 0.39.0+ is required to build BothamUI.
To integrate BothamUI into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'BothamUI', '~> 1.0'
Then, run the following command:
$ pod install
Do you want to contribute?
Feel free to report us or add any useful feature to the library, we will be glad to improve it with your help.
Keep in mind that your PRs must be validated by Travis-CI.
License
Copyright 2015 Karumi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the BothamUI README section above
are relevant to that project's source code only.