NUIRenderer

public class NUIRenderer: NSObject

The master renderer class that provides a list of static functions for individual component rendering

  • Render UIActivityIndicatorView with the default ActivityIndicator style class

    Declaration

    Swift

    public static func renderActivityIndicator(activityIndicator: UIActivityIndicatorView)

    Parameters

    activityIndicator

    The UIActivityIndicatorView being rendered.

  • Render UIActivityIndicatorView with an given style class

    Declaration

    Swift

    public static func renderActivityIndicator(activityIndicator: UIActivityIndicatorView, withClass className: String)

    Parameters

    activityIndicator

    The UIActivityIndicatorView being rendered.

    className

    The name of class style for rendering the component.

  • Render UIBarButtonItem with the default BarButton style class

    Declaration

    Swift

    public static func renderBarButtonItem(item: UIBarButtonItem)

    Parameters

    item

    The UIBarButtonItem being rendered.

  • Render UIBarButtonItem with an given style class

    Declaration

    Swift

    public static func renderBarButtonItem(item: UIBarButtonItem, withClass className: String)

    Parameters

    item

    The UIBarButtonItem being rendered.

    className

    The name of class style for rendering the component.

  • Render UIButton with the default Button style class

    Declaration

    Swift

    public static func renderButton(button: UIButton)

    Parameters

    button

    The UIButton being rendered.

  • Render UIButton with an given style class

    Declaration

    Swift

    public static func renderButton(button: UIButton, withClass className: String)

    Parameters

    button

    The UIButton being rendered.

    className

    The name of class style for rendering the component.

  • Render UIControl with the default Control style class

    Declaration

    Swift

    public static func renderControl(control: UIControl)

    Parameters

    control

    The UIControl being rendered.

  • Render UIControl with a given style class

    Declaration

    Swift

    public static func renderControl(control: UIControl, withClass className: String)

    Parameters

    control

    The UIControl being rendered.

    className

    The name of class style for rendering the component.

  • Render UILabel with the default Label style class

    Declaration

    Swift

    public static func renderLabel(label: UILabel)

    Parameters

    label

    The UILabel being rendered.

  • Render UILabel with a given style class

    Declaration

    Swift

    public static func renderLabel(label: UILabel, withClass className: String)

    Parameters

    label

    The UILabel being rendered.

    className

    The name of class style for rendering the component.

  • Render UILabel with a given style class and suffix

    Declaration

    Swift

    public static func renderLabel(label: UILabel, withClass className: String, withSuffix suffix: String)

    Parameters

    label

    The UILabel being rendered.

    className

    The name of class style for rendering the component.

    suffix

    The suffix to the className.

  • Render UIImageView with a given style class

    Declaration

    Swift

    public static func renderImageView(imageView: UIImageView, withClass className: String)

    Parameters

    imageView

    The UIImageView being rendered.

    className

    The name of class style for rendering the component.

  • Render UINavigationBar with the default NavigationBar style class

    Declaration

    Swift

    public static func renderNavigationBar(bar: UINavigationBar)

    Parameters

    bar

    The UINavigationBar being rendered.

  • Render UINavigationBar with a given style class

    Declaration

    Swift

    public static func renderNavigationBar(bar: UINavigationBar, withClass className: String)

    Parameters

    imageView

    The UINavigationBar being rendered.

    className

    The name of class style for rendering the component.

  • Render UIProgressView with the default Progress style class

    Declaration

    Swift

    public static func renderProgressView(progressView: UIProgressView)

    Parameters

    progressView

    The UIProgressView being rendered.

  • Render UIProgressView with a given style class

    Declaration

    Swift

    public static func renderProgressView(progressView: UIProgressView, withClass className: String)

    Parameters

    progressView

    The UIProgressView being rendered.

    className

    The name of class style for rendering the component.

  • Render UINavigationItem with the default NavigationBar style class

    Declaration

    Swift

    public static func renderNavigationItem(item: UINavigationItem)

    Parameters

    item

    The UINavigationItem being rendered.

  • Render UINavigationItem with a given style class

    Declaration

    Swift

    public static func renderNavigationItem(item: UINavigationItem, withClass className: String)

    Parameters

    item

    The UINavigationItem being rendered.

    className

    The name of class style for rendering the component.

  • Render UISearchBar with the default SearchBar style class

    Declaration

    Swift

    public static func renderSearchBar(bar: UISearchBar)

    Parameters

    bar

    The UISearchBar being rendered.

  • Render UISearchBar with a given style class

    Declaration

    Swift

    public static func renderSearchBar(bar: UISearchBar, withClass className: String)

    Parameters

    bar

    The UISearchBar being rendered.

    className

    The name of class style for rendering the component.

  • Render UISegmentedControl with the default SegmentedControl style class

    Declaration

    Swift

    public static func renderSegmentedControl(control: UISegmentedControl)

    Parameters

    control

    The UISegmentedControl being rendered.

  • Render UISegmentedControl with a given style class

    Declaration

    Swift

    public static func renderSegmentedControl(control: UISegmentedControl, withClass className: String)

    Parameters

    control

    The UISegmentedControl being rendered.

    className

    The name of class style for rendering the component.

  • Render UISlider with the default Slider style class

    Declaration

    Swift

    public static func renderSlider(slider: UISlider)

    Parameters

    control

    The UISlider being rendered.

  • Render UISlider with a given style class

    Declaration

    Swift

    public static func renderSlider(slider: UISlider, withClass className: String)

    Parameters

    slider

    The UISlider being rendered.

    className

    The name of class style for rendering the component.

  • Render UISwitch with the default Switch style class

    Declaration

    Swift

    public static func renderSwitch(uiSwitch: UISwitch)

    Parameters

    uiSwitch

    The UISwitch being rendered.

  • Render UISwitch with a given style class

    Declaration

    Swift

    public static func renderSwitch(uiSwitch: UISwitch, withClass className: String)

    Parameters

    uiSwitch

    The UISwitch being rendered.

    className

    The name of class style for rendering the component.

  • Render UIPageControl with the default PageControl style class

    Declaration

    Swift

    public static func renderPageControl(pageControl: UIPageControl)

    Parameters

    uiSwitch

    The UIPageControl being rendered.

  • Render UIPageControl with a given style class

    Declaration

    Swift

    public static func renderPageControl(pageControl: UIPageControl, withClass className: String)

    Parameters

    pageControl

    The UIPageControl being rendered.

    className

    The name of class style for rendering the component.

  • Render UITabBar with the default TabBar style class

    Declaration

    Swift

    public static func renderTabBar(bar: UITabBar)

    Parameters

    uiSwitch

    The UITabBar being rendered.

  • Render UITabBar with a given style class

    Declaration

    Swift

    public static func renderTabBar(bar: UITabBar, withClass className: String)

    Parameters

    bar

    The UITabBar being rendered.

    className

    The name of class style for rendering the component.

  • Render UITabBarItem with the default TabBarItem style class

    Declaration

    Swift

    public static func renderTabBarItem(item: UITabBarItem)

    Parameters

    UITabBarItem

    The UITabBarItem being rendered.

  • Render UITabBarItem with a given style class

    Declaration

    Swift

    public static func renderTabBarItem(item: UITabBarItem, withClass className: String)

    Parameters

    item

    The UITabBarItem being rendered.

    className

    The name of class style for rendering the component.

  • Render UITableView with the default TableView style class

    Declaration

    Swift

    public static func renderTableView(tableView: UITableView)

    Parameters

    tableView

    The UITableView being rendered.

  • Render UITableView with a given style class

    Declaration

    Swift

    public static func renderTableView(tableView: UITableView, withClass className: String)

    Parameters

    tableView

    The UITableView being rendered.

    className

    The name of class style for rendering the component.

  • Render UITableViewCell with the default TableCell style class

    Declaration

    Swift

    public static func renderTableViewCell(cell: UITableViewCell)

    Parameters

    tableView

    The UITableViewCell being rendered.

  • Render UITableViewCell with a given style class

    Declaration

    Swift

    public static func renderTableViewCell(cell: UITableViewCell, withClass className: String)

    Parameters

    cell

    The UITableViewCell being rendered.

    className

    The name of class style for rendering the component.

  • Render UIToolbar with the default Toolbar style class

    Declaration

    Swift

    public static func renderToolbar(bar: UIToolbar)

    Parameters

    tableView

    The UIToolbar being rendered.

  • Render UIToolbar with a given style class

    Declaration

    Swift

    public static func renderToolbar(bar: UIToolbar, withClass className: String)

    Parameters

    bar

    The UIToolbar being rendered.

    className

    The name of class style for rendering the component.

  • Render UITextField with the default TextField style class

    Declaration

    Swift

    public static func renderTextField(textField: UITextField)

    Parameters

    textField

    The UITextField being rendered.

  • Render UITextField with a given style class

    Declaration

    Swift

    public static func renderTextField(textField: UITextField, withClass className: String)

    Parameters

    textField

    The UITextField being rendered.

    className

    The name of class style for rendering the component.

  • Render UITextView with the default TextView style class

    Declaration

    Swift

    public static func renderTextView(textView: UITextView)

    Parameters

    textView

    The UITextView being rendered.

  • Render UITextView with a given style class

    Declaration

    Swift

    public static func renderTextView(textView: UITextView, withClass className: String)

    Parameters

    textView

    The UITextView being rendered.

    className

    The name of class style for rendering the component.

  • Render UIView with the default View style class

    Declaration

    Swift

    public static func renderView(view: UIView)

    Parameters

    view

    The UIView being rendered.

  • Render UIView with a given style class

    Declaration

    Swift

    public static func renderView(view: UIView, withClass className: String)

    Parameters

    view

    The UIView being rendered.

    className

    The name of class style for rendering the component.

  • Render UIView with a given style class and suffix to the style class

    Declaration

    Swift

    public static func renderView(view: UIView, withClass className: String, withSuffix suffix: String)

    Parameters

    view

    The UIView being rendered.

    className

    The name of class style for rendering the component.

    suffix

    The suffix to the className.

  • Render UIWindow with the default Window style class

    Declaration

    Swift

    public static func renderWindow(window: UIWindow)

    Parameters

    window

    The UIWindow being rendered.

  • Render UIWindow with a given style class

    Declaration

    Swift

    public static func renderWindow(window: UIWindow, withClass className: String)

    Parameters

    window

    The UIWindow being rendered.

    className

    The name of class style for rendering the component.

  • Checks to see if a given style class contains any text transform property.

    Declaration

    Swift

    public static func needsTextTransformWithClass(className: String) -> Bool

    Parameters

    className

    The name of class style for transforming the text.

    Return Value

    true if the given style class contains the text transform property; otherwise false.

  • Transform a given text based on a given style class

    Declaration

    Swift

    public static func transformText(text: String, withClass className: String) -> String

    Parameters

    text

    The text to be transformed.

    className

    The name of class style for transforming the text.

  • Render UINavigationBar with the style class set.

    Declaration

    Swift

    public static func sizeDidChangeForNavigationBar(bar: UINavigationBar)

    Parameters

    bar

    The UINavigationBar being rendered.

  • Render UITabBar with the style class set.

    Declaration

    Swift

    public static func sizeDidChangeForTabBar(bar: UITabBar)

    Parameters

    bar

    The UITabBar being rendered.

  • Render UITableViewCell with the style class set.

    Declaration

    Swift

    public static func sizeDidChangeForTableViewCell(cell: UITableViewCell)

    Parameters

    cell

    The UITableViewCell being rendered.

  • Render UITableView with the style class set.

    Declaration

    Swift

    public static func sizeDidChangeForTableView(tableView: UITableView)

    Parameters

    tableView

    The UITableView being rendered.

  • Add an orientation observer in NotificationCenter

    Declaration

    Swift

    public static func addOrientationDidChangeObserver(observer: AnyObject)

    Parameters

    observer

    The AnyObject to be added as an observer.

  • Remove the given observer from NotificationCenter

    Declaration

    Swift

    public static func removeOrientationDidChangeObserver(observer: AnyObject)

    Parameters

    observer

    The AnyObject to be removed.

  • Rerender the root view

    Declaration

    Swift

    public static func rerender()
  • Rerender the given UIView

    Declaration

    Swift

    public static func rerenderView(view: UIView)

    Parameters

    view

    The UIView to be rerendered.

  • Add or remove orientaiton observer

    Declaration

    Swift

    public static func setRerenderOnOrientationChange(rerender: Bool)

    Parameters

    rerender

    true to add the observer by calling addOrientationDidChangeObserver; otherwise, remove the observer by calling removeOrientationDidChangeObserver

  • Get the global NUIRenderer instance.

    Declaration

    Swift

    public static func getInstance() -> NUIRenderer

    Return Value

    The NUIRenderer instance.

  • Rerender the view when the orientation did changed

    Declaration

    Swift

    public static func orientationDidChange(notification: NSNotification)

    Parameters

    notification

    The NSNotification object

  • Rerender the view when stylesheet file changed

    Declaration

    Swift

    public static func stylesheetFileChanged()