@interface DUXWidgetCollectionViewController : UIViewController <DUXWidgetCollectionViewControllerProtocol> |
Header: | DUXWidgetCollectionViewController.h |
Inherits From: | UIViewController |
A base widget collection view controller to manage a standard widget collection.
@property (nonatomic) NSUInteger preferredCameraIndex |
Header: | DUXWidgetCollectionViewController.h |
Selects which camera index widget refers to.
@property (nonatomic, strong, nullable) IBOutlet __kindof UICollectionView <DUXWidgetCollectionViewProtocol> *widgetCollectionView |
Header: | DUXWidgetCollectionViewController.h |
The view acting as the widget collection.
- (void)installMainView:(nonnull UIView *)view |
Header: | DUXWidgetCollectionViewController.h |
Places the MainView of the VC as a full size subview of base view..
nonnull UIView * view | The view being installed as the main view. |
- (nullable DUXWidgetItem *)widgetItemAtIndex:(NSInteger)index |
Header: | DUXWidgetCollectionViewController.h |
returns the widget item at the passed index.
NSInteger index | The index of the desired widget item contained inside the view. |
nullable DUXWidgetItem * | a widget or nil |
- (nullable UIView<DUXWidgetProtocol> *)widgetWithClass:(nonnull Class)widgetClass |
Header: | DUXWidgetCollectionViewController.h |
returns the first widget with the passed class.
nonnull Class widgetClass | The class of the desired widget item contained inside the view. |
nullable UIView<DUXWidgetProtocol> * | a widget or nil |
- (void)insertWidget:(nonnull UIView <DUXWidgetProtocol> *)widget atIndex:(NSUInteger)destinationIndex |
Header: | DUXWidgetCollectionViewController.h |
inserts the widget at the passed index.
nonnull UIView <DUXWidgetProtocol> * widget | The widget item being inserted inside the view. |
NSUInteger destinationIndex | The desired index of the widget being inserted. |
- (void)insertWidget:(nonnull UIView <DUXWidgetProtocol> *)widget withEdgeInset:(UIEdgeInsets)edgeInset atIndex:(NSUInteger)destinationIndex |
Header: | DUXWidgetCollectionViewController.h |
Insert the passed widgets at the given index and applies the edge inset.
nonnull UIView <DUXWidgetProtocol> * widget | The widget item being inserted inside the view. |
UIEdgeInsets edgeInset | The edge inset of the widget item being inserted. |
NSUInteger destinationIndex | The desired index of the widget being inserted. |
- (void)moveWidget:(nonnull UIView <DUXWidgetProtocol> *)widget toIndex:(NSUInteger)destinationIndex |
Header: | DUXWidgetCollectionViewController.h |
Moves the widget to another index.
nonnull UIView <DUXWidgetProtocol> * widget | The widget item being moved. |
NSUInteger destinationIndex | The desired new index of the widget item. |
@protocol DUXWidgetCollectionViewControllerProtocol <NSObject> |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
Inherits From: | NSObject |
This protocol defines the expected behavior for view controller to manage widget collection views.
@property (strong, nonatomic, nullable) __kindof UIView<DUXWidgetCollectionViewProtocol> *widgetCollectionView |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
The actual instance of the widget collection.
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
Adds the passed widget to the collection.
nonnull UIView <DUXWidgetProtocol> * newWidget | The widget item being added. |
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
Adds the passed widget to the collection and applies the given edge insets.
nonnull UIView <DUXWidgetProtocol> * newWidget | The widget item being added. |
UIEdgeInsets edgeInset | The widget item. |
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
The number of widgets currently in the collection.
NSUInteger | the count of widgets |
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
The index of the passed widget.
nonnull UIView <DUXWidgetProtocol> * widget | The widget item whose index is returned. |
NSInteger | an index |
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
Returns the widget at the passed index.
NSInteger index | The index of the widget item returned. |
nullable UIView <DUXWidgetProtocol> * | a widget or nil |
@required |
Header: | DUXWidgetCollectionViewControllerProtocol.h |
Removes the passed widget.
nonnull UIView <DUXWidgetProtocol> * oldWidget | The previous widget. |