Stanwood
public struct Stanwood
                Stanwood global instance
- 
                  
                  
Checking if Snapshot is running.
Declaration
Swift
public let isRunningSnapshot: Bool 
- 
                  
                  
The
AbstractCollectionDataSourceconforms to theCollectionDataSourceprotocol and implementsAbstractCollectionDataSource.numberOfSections(in:)andAbstractCollectionDataSource.collectionView(_:numberOfItemsInSection:). It midiates the application data modelDataTypeandTypefor theUICollectionView.It is requried to subclass
AbstractCollectionDataSourceand overrideAbstractCollectionDataSource.collectionView(_:cellForItemAt:)Example: DataSource and Delegate design
let items = [Element(id: "1"), Element(id: "2")] self.objects = Stanwood.Elements<Element>(items: items) self.dataSource = ElementDataSource(dataObject: objects) self.delegate = ElementDelegate(dataObject: objects) self.collectionView.dataSource = self.dataSource self.collectionView.delegate = self.delegateSee also
See moreObjectsDeclaration
Swift
@available(*, deprecated, message: "Migrate to `CollectionDataSource` https://github.com/stanwood/SourceModel_iOS") open class AbstractCollectionDataSource : NSObject, UICollectionViewDataSource, CollectionDataSource, DataSourceType 
- 
                  
                  
The
AbstractCollectionDelegateconforms to theCollectionDelegateprotocol. It allows you to manage the selection and highlighting of items in a collection view and to perform actions on those items.UICollectionView.Example: DataSource and Delegate design
let items = [Element(id: "1"), Element(id: "2")] self.objects = Stanwood.Elements<Element>(items: items) self.dataSource = ElementDataSource(dataObject: objects) self.delegate = ElementDelegate(dataObject: objects) self.collectionView.dataSource = self.dataSource self.collectionView.delegate = self.delegateSee also
See moreObjectsDeclaration
Swift
@available(*, deprecated, message: "Migrate to `CollectionDelegate` https://github.com/stanwood/SourceModel_iOS") open class AbstractCollectionDelegate : NSObject, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, CollectionDelegate, DelegateSourceType 
- 
                  
                  
The
AbstractTableDataSourceconforms to theTableDataSourceprotocol and implementsAbstractTableDataSource.numberOfSections(in:)andAbstractTableDataSource.tableView(_:numberOfRowsInSection:). It midiates the application data modelDataTypeandTypefor theUITableView.It is requried to subclass
AbstractTableDataSourceand overrideAbstractTableDataSource.tableView(_:cellForRowAt:)Example: DataSource and Delegate design
let items = [Element(id: "1"), Element(id: "2")] self.objects = Stanwood.Elements<Element>(items: items) self.dataSource = ElementDataSource(dataType: objects) self.delegate = ElementDelegate(dataType: objects) self.tableView.dataSource = self.dataSource self.tableView.delegate = self.delegateSee also
See moreObjectsDeclaration
Swift
@available(*, deprecated, message: "Migrate to `TableDataSource` https://github.com/stanwood/SourceModel_iOS") open class AbstractTableDataSource : NSObject, UITableViewDataSource, TableDataSource, DataSourceType 
- 
                  
                  
The
AbstractTableDelegateconforms to theTableDelegateprotocol. It allows you to manage the selection and highlighting of items in a collection view and to perform actions on those items.UITableView.Example: DataSource and Delegate design
let items = [Element(id: "1"), Element(id: "2")] self.objects = Stanwood.Elements<Element>(items: items) self.dataSource = ElementDataSource(dataType: objects) self.delegate = ElementDelegate(dataType: objects) self.tableView.dataSource = self.dataSource self.tableView.delegate = self.delegateSee also
See moreObjectsDeclaration
Swift
@available(*, deprecated, message: "Migrate to `TableDelegate` https://github.com/stanwood/SourceModel_iOS") open class AbstractTableDelegate : NSObject, UITableViewDelegate, TableDelegate, DelegateSourceType 
- 
                  
                  
Coding bridge is a helper struct that bridge NSCoding and Codable objects
See moreDeclaration
Swift
public struct CodingBridge<Coding> : Codable where Coding : NSCoding 
- 
                  
                  
Elements holds an array of element types.
Important: only supports a single section dataType. For a more complex solution, please conform to the
DataTypeprotocol.Example: DataSource and Delegate design
let items = [Element(id: "1"), Element(id: "2")] self.objects = Stanwood.Elements<Element>(items: items) self.dataSource = ElementsDataSource(dataObject: elements) self.delegate = ElementsDelegate(dataObject: elements) self.collectionView.dataSource = self.dataSource self.collectionView.delegate = self.delegateSee moreSee also
Declaration
Swift
@available(*, deprecated, message: "Migrate to https://github.com/stanwood/SourceModel_iOS") open class Elements<Element> : DataType, Codable where Element : Type, Element : Decodable, Element : Encodable, Element : Equatable 
- 
                  
                  
Declaration
Swift
@available(iOS 10.0, *) open class FeedbackGenerator 
- 
                  
                  
A convinient observer class to add observers to
See moreNotificationCenterDeclaration
Swift
public struct Observer 
- 
                  
                  
Sections holds an array of DataTypes.
Example: DataSource and Delegate design
let itemsOne = [Item(id: "1"), Item(id: "2")] let itemsTwo = [Meal(id: "pizza"), Meal(id: "ham")] let sectionOnce = Stanwoon.Elements<Item>(items: itemsOne) let sectionTwo = Stanwoon.Elements<Meal>(items: itemsTwo) self.sections = Stanwood.Sections(items: [sectionOnce, sectionTwo]) self.dataSource = SectionsDataSource(dataObject: self.sections) self.delegate = SectionsDelegate(dataObject: self.sections) self.collectionView.dataSource = self.dataSource self.collectionView.delegate = self.delegateSee moreSee also
Declaration
Swift
@available(*, deprecated, message: "Migrate to https://github.com/stanwood/SourceModel_iOS") open class Sections : DataType 
- 
                  
                  
Inherit AutoSizeableCell to conform to Autosizable protocol
See moreDeclaration
Swift
@available(iOS 10.0, *) open class AutoSizeableCell : UICollectionViewCell, AutoSizeable 
            View on GitHub
          
      Stanwood Structure Reference