Classes

The following classes are available globally.

  • 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 view
  • Since

    Since we design a form, we should skip reusable cells and just keep stong references of every cell: we wouldn’t need a cache anymore

    objc.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, FlaneurImagePicker is actually a form component library. It would probably make sense that other form components belong to the same library, that should then be renamed FlaneurForm or something similar.

    See more

    Declaration

    Swift

    public final class FlaneurFormView: UIView
  • Utility class to display a map view with annotations with very little effort.

    See more

    Declaration

    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 a UINavigationController.

    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 via UIAppearance 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 FlaneurNavigationBar. Cf. FlaneurNavigationBarDemoViewController.

    See more

    Declaration

    Swift

    final public class FlaneurNavigationBar: UIView
  • 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 or UINavigationItem‘s searchController introduced in iOS 11.0, or any other immediate location for a UISearchController’s searchBar, 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 instanciateSearchResultsController and searchControllerWillBecomeActive, and call startSearchAction when relevant.

    See more

    Declaration

    Swift

    open class FlaneurSearchViewController: UIViewController
  • A progress view controller that is intended to be presented modally over an existing view controller

    See more

    Declaration

    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 more

    Declaration

    Swift

    final public class SegmentedCollectionView: UIView