XuniCollectionView Class Reference

Conforms to ObjectType
__covariant
Declared in CollectionView.h

Overview

Class XuniCollectionView.

  isUpdating

Gets a value that indicates whether notifications are currently suspended.

@property (readonly) BOOL isUpdating

Discussion

Gets a value that indicates whether notifications are currently suspended.

Declared In

CollectionView.h

– init

Initialize an object for XuniCollectionView.

- (id)init

Return Value

an object of XuniCollectionView.

Discussion

Initialize an object for XuniCollectionView.

Declared In

CollectionView.h

– initWithSource:

Initialize an object for XuniCollectionView with sourceCollection.

- (id)initWithSource:(NSArray<ObjectType> *)sourceCollection

Parameters

sourceCollection

the source of the collection.

Return Value

return an object of XuniCollectionView with sourceCollection.

Discussion

Initialize an object for XuniCollectionView with sourceCollection.

Declared In

CollectionView.h

– implementsInterface:

Implements interface.

- (BOOL)implementsInterface:(NSString *)interfaceName

Parameters

interfaceName

the interface name string.

Return Value

a boolean value.

Discussion

Implements interface.

Declared In

CollectionView.h

  newItemCreator

Gets or sets a function that creates new items for the collection.

@property (nonatomic, copy) XuniFunction newItemCreator

Discussion

Gets or sets a function that creates new items for the collection.

Declared In

CollectionView.h

  sortConverter

Gets or sets a function used to convert values when sorting.

@property (nonatomic, copy) IXuniSortConverter sortConverter

Discussion

Gets or sets a function used to convert values when sorting.

Declared In

CollectionView.h

– createGroups:

Creates a grouped view of the current page

- (NSMutableArray *)createGroups:(NSArray *)items

Parameters

items

the items.

Return Value

return a mutable array.

Discussion

Creates a grouped view of the current page

Declared In

CollectionView.h

– compareItems

Comparison function used in array sort.

- (NSComparator)compareItems

Return Value

return the result of comparison.

Discussion

Comparison function used in array sort.

Declared In

CollectionView.h

– mergeGroupItems:

Gets an array that contains all the children for a list of groups.

- (NSArray *)mergeGroupItems:(NSArray *)groups

Parameters

groups

the groups.

Return Value

return an array.

Discussion

Gets an array that contains all the children for a list of groups.

Declared In

CollectionView.h

– getGroup:groups:name:level:isBottomLevel:

Finds or creates a group

- (XuniCollectionViewGroup<ObjectType> *)getGroup:(XuniGroupDescription *)gd groups:(NSArray *)groups name:(NSString *)name level:(NSUInteger)level isBottomLevel:(BOOL)isBottomLevel

Parameters

gd

group description.

groups

the groups array.

name

the name.

level

the level.

isBottomLevel

whether is bottom level.

Return Value

return a collectionView group.

Discussion

Finds or creates a group

Declared In

CollectionView.h

  canFilter

Gets a value that indicates whether this view supports filtering.

@property (readonly) BOOL canFilter

Discussion

Gets a value that indicates whether this view supports filtering.

Declared In

CollectionView.h

  canGroup

Gets a value that indicates whether this view supports grouping.

@property (readonly) BOOL canGroup

Discussion

Gets a value that indicates whether this view supports grouping.

Declared In

CollectionView.h

  canSort

Gets a value that indicates whether this view supports sorting.

@property (readonly) BOOL canSort

Discussion

Gets a value that indicates whether this view supports sorting.

Declared In

CollectionView.h

  currentItem

Gets the current item in the view.

@property (readonly) ObjectType currentItem

Discussion

Gets the current item in the view.

Declared In

CollectionView.h

  currentPosition

Gets the ordinal position of the current item in the view.

@property (readonly) int currentPosition

Discussion

Gets the ordinal position of the current item in the view.

Declared In

CollectionView.h

  filter

Gets or sets a callback used to determine if an item is suitable for inclusion in the view.

@property (nonatomic, copy) IXuniPredicate filter

Discussion

Gets or sets a callback used to determine if an item is suitable for inclusion in the view.

Declared In

CollectionView.h

  groupDescriptions

Gets a collection of objects that describe how the items in the collection are grouped in the view.

@property (readonly) XuniObservableArray<XuniGroupDescription*> *groupDescriptions

Discussion

Gets a collection of objects that describe how the items in the collection are grouped in the view.

Declared In

CollectionView.h

  groups

Gets the top-level groups.

@property (readonly) NSArray *groups

Discussion

Gets the top-level groups.

Declared In

CollectionView.h

  isEmpty

Gets a value that indicates whether this view contains no items.

@property (readonly) BOOL isEmpty

Discussion

Gets a value that indicates whether this view contains no items.

Declared In

CollectionView.h

  sortDescriptions

Gets a collection of @see:SortDescription objects that describe how the items in the collection are sorted in the view.

@property (readonly) XuniObservableArray *sortDescriptions

Discussion

Gets a collection of @see:SortDescription objects that describe how the items in the collection are sorted in the view.

Declared In

CollectionView.h

  sourceCollection

Gets or sets the collection object from which to create this view.

@property NSMutableArray<ObjectType> *sourceCollection

Discussion

Gets or sets the collection object from which to create this view.

Declared In

CollectionView.h

  items

Gets the filtered, sorted, grouped items in the view.

@property (readonly) NSArray<ObjectType> *items

Discussion

Gets the filtered, sorted, grouped items in the view.

Declared In

CollectionView.h

  currentChanged

Occurs after the current item changes.

@property XuniEvent<XuniEventArgs*> *currentChanged

Discussion

Occurs after the current item changes.

Declared In

CollectionView.h

  currentChanging

Occurs before the current item changes.

@property XuniEvent<XuniCancelEventArgs*> *currentChanging

Discussion

Occurs before the current item changes.

Declared In

CollectionView.h

– onCurrentChanged:

Raises the currentChanged event.

- (void)onCurrentChanged:(XuniEventArgs *)e

Parameters

e

the arguments of a event.

Discussion

Raises the currentChanged event.

Declared In

CollectionView.h

– onCurrentChanging:

Raises the currentChanging event.

- (BOOL)onCurrentChanging:(XuniCancelEventArgs *)e

Parameters

e

the arguments of a event.

Return Value

return a boolean value.

Discussion

Raises the currentChanging event.

Declared In

CollectionView.h

  canAddNew

Gets a value that indicates whether a new item can be added to the collection.

@property (readonly) BOOL canAddNew

Discussion

Gets a value that indicates whether a new item can be added to the collection.

Declared In

CollectionView.h

  canCancelEdit

Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.

@property (readonly) BOOL canCancelEdit

Discussion

Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.

Declared In

CollectionView.h

  canRemove

Gets a value that indicates whether items can be removed from the collection.

@property (readonly) BOOL canRemove

Discussion

Gets a value that indicates whether items can be removed from the collection.

Declared In

CollectionView.h

  currentAddItem

Gets the item that is being added during the current add transaction.

@property (readonly) ObjectType currentAddItem

Discussion

Gets the item that is being added during the current add transaction.

Declared In

CollectionView.h

  currentEditItem

Gets the item that is being edited during the current edit transaction.

@property (readonly) ObjectType currentEditItem

Discussion

Gets the item that is being edited during the current edit transaction.

Declared In

CollectionView.h

  isAddingNew

Gets a value that indicates whether an add transaction is in progress.

@property (readonly) BOOL isAddingNew

Discussion

Gets a value that indicates whether an add transaction is in progress.

Declared In

CollectionView.h

  isEditingItem

Gets a value that indicates whether an edit transaction is in progress.

@property (readonly) BOOL isEditingItem

Discussion

Gets a value that indicates whether an edit transaction is in progress.

Declared In

CollectionView.h

  itemCount

Gets the number of items in the view.

@property (readonly) int itemCount

Discussion

Gets the number of items in the view.

Declared In

CollectionView.h

  collectionChanged

Occurs after the collection changes.

@property XuniEvent<XuniNotifyCollectionChangedEventArgs*> *collectionChanged

Discussion

Occurs after the collection changes.

Declared In

CollectionView.h

– onCollectionChanged:

Raises the collectionChanged event.

- (void)onCollectionChanged:(XuniNotifyCollectionChangedEventArgs *)e

Parameters

e

the arguments of a event.

Discussion

Raises the collectionChanged event.

Declared In

CollectionView.h

– raiseCollectionChanged

Creates event args and calls onCollectionChanged.

- (void)raiseCollectionChanged

Discussion

Creates event args and calls onCollectionChanged.

Declared In

CollectionView.h

– raiseCollectionChangedParams:items:startingIndex:oldItems:oldStartingIndex:

Called when the collection has changed to push necessary notifications to listeners.

- (void)raiseCollectionChangedParams:(XuniNotifyCollectionChangedAction)action items:(NSMutableArray<ObjectType> *)items startingIndex:(long)startingIndex oldItems:(NSMutableArray<ObjectType> *)oldItems oldStartingIndex:(long)oldStartingIndex

Parameters

action

The type of collection change.

items

The list of new items added.

startingIndex

The index of the new items in the updated collection.

oldItems

The list of items removed or changed.

oldStartingIndex

The start index of the old items removed from the collection.

Discussion

Called when the collection has changed to push necessary notifications to listeners.

Declared In

CollectionView.h