Classes
The following classes are available globally.
-
Undocumented
See moreDeclaration
Swift
public class FlaneurCollectionFilter
-
TODO
See moreDeclaration
Swift
final public class FlaneurCollectionView: UIView
-
Undocumented
See moreDeclaration
Swift
public class FlaneurFilterCollectionViewCell: UICollectionViewCell
-
Declaration
Swift
public class FlaneurFormElement
-
Undocumented
See moreDeclaration
Swift
public class FlaneurFormElementCollectionViewCell: UICollectionViewCell
-
Undocumented
See moreDeclaration
Swift
final public class FlaneurFormImagePickerElementCollectionViewCell: FlaneurFormElementCollectionViewCell
-
View in charge of displaying form elements.
It is quite poorly designed as many problems arose late in the implementation:
- Instead of a form, it would probably make more sense to use a table view controller
- Using a
IGListKit
-backed collection view is a terrible idea, it should be a simple table viewSince
Since we design a form, we should skip reusable cells and just keep stong references of every cell: we wouldn’t need a cache anymoreobjc.io’s Swit Talks addressed the problems of reusable form components design in a series. It is a good inspiration to redesign this component.
Also,
See moreFlaneurImagePicker
is actually a form component library. It would probably make sense that other form components belong to the same library, that should then be renamedFlaneurForm
or something similar.Declaration
Swift
public final class FlaneurFormView: UIView
-
Undocumented
See moreDeclaration
Swift
public class FlaneurMapAnnotation: MKPointAnnotation
-
Utility class to display a map view with annotations with very little effort.
See moreDeclaration
Swift
open class FlaneurMapView: UIView
-
A visual control aiming to reproduce the visual aspect of a
UINavigationBar
, with a custom height size, but without the functional part requiring aUINavigationController
.Overview
A
FlaneurNavigationBar
is a bar, typically displayed at the top of the window, containing buttons that can be easily customized with blocks. The primary components are a left button, a title, and an optional array of right buttons. You must use a flaneur navigation bar as a standalone object. It has no compatibility whatsoever with a navigation controller object.Behaviors
When a left action is configured, then the whole navigation bar actions it. It does not interfere with the right buttons.
Using a FlaneurNavigationBar
If you’re using a storyboard to instanciate your views, you should try to use a height of 66 pt. After placing the view, you can configure its content programmatically:
@IBOutlet weak var navigationBar: FlaneurNavigationBar! let leftAction = FlaneurNavigationBarAction(image: ...) { _ in ... } self.navigationBar.configure(title: ..., leftAction: myLeftAction)
Customizing the appearance of the bar via
UIAppearance
You can customize the appearance of a
FlaneurNavigationBar
viaUIAppearance
so that it has a consistent appearance in your app with unique lines of code.For instance, the following code makes the title of the bar use the Futura font everywhere in your app:
UILabel.appearance(whenContainedInInstancesOf: [FlaneurNavigationBar.self]).font = UIFont(name: "Futura-Medium", size: 16.0)
Demo
The FlaneurOpen demo app includes a demo for
See moreFlaneurNavigationBar
. Cf.FlaneurNavigationBarDemoViewController
.Declaration
Swift
final public class FlaneurNavigationBar: UIView
-
Undocumented
See moreDeclaration
Swift
public final class FlaneurOpenThemeManager
-
This class is a convenience wrapper around
UISearchController
that view controllers can subclass to inherit some behaviors.Why this class?
If you don’t use a
UITableView
orUINavigationItem
‘ssearchController
introduced in iOS 11.0, or any other immediate location for aUISearchController
’ssearchBar
, and you want to use AutoLayout, things can get weird/hacky/difficult.This class fixes all positioning problems found in an app using a navigation controller hierarchy with hidden navigation bars, and using iOS 9.0.
It will display the search bar right under your view controller’s top layout guide.
Subclassing
To subclass this class, provide your own implementations of
See moreinstanciateSearchResultsController
andsearchControllerWillBecomeActive
, and callstartSearchAction
when relevant.Declaration
Swift
open class FlaneurSearchViewController: UIViewController
-
A generic implementation of a
UITableViewController
.Based on objc.io’s Generic Table View Controllers.
See moreDeclaration
Swift
public final class ItemsViewController<Item>: UITableViewController
-
This is a convenience helper to manage keyboard appearances and disappearances.
Usage
Instanciate the object in your view controller’s
viewWillAppear
to start observing notifications. The object will stop observing notifications so as long as you don’t have memory leaks, you don’t need to handle it anywhere else. Otherwise, just reinit your keyboard observer tonil
and it will stop observing.Inspiration
- Text Programming Guide for iOS - Moving Content That Is Located Under the Keyboard
- Swift Talk #27 - Typed Notifications (Part 1)
Declaration
Swift
final public class KeyboardObserver
-
Undocumented
See moreDeclaration
Swift
public final class LayoutBorderManager
-
Undocumented
See moreDeclaration
Swift
open class LoadingCollectionViewCell: UICollectionViewCell
-
Undocumented
See moreDeclaration
Swift
final public class MultiSelectCollectionViewController<Item: MultiSelectable>: UICollectionViewController
-
A progress view controller that is intended to be presented modally over an existing view controller
See moreDeclaration
Swift
final public class ProgressModalViewController: UIViewController
-
An object that manages a segmented collection of data items and presents them using a collection view.
It looks like this:
TODO
See moreDeclaration
Swift
final public class SegmentedCollectionView: UIView