SGAnnotationViewContainer


Containers provide a storage structure for SGRecordAnnotationViews in the AR view.

Superclass: UIButton
Declared In: SGAnnotationViewContainer.h

Discussion

The main intention of a container is to allow the user to be able to separate records from each other. Because there can be a high volume of records per location, users can drag views into containers until they reach the desired view.

Containers are registered with the AR view by addContainer: .



Methods

-addRecordAnnotationViews:

Adds an array of annotation views to the container.

-getRecordAnnotations

Returns the SGRecordAnnotations of all annotation views held by the container.

-getRecordAnnotationViews

 Returns the record views associated with the container.

-isEmpty

Determines whether the container is empty.

-removeAllAnnotationViews

 Removes all annotations views held by the container.

-removeAnnotationView:

Removes a annotation view from the container.

-shouldAddViews:

This method is called before annotation views are added to the container. The default return value is YES.


addRecordAnnotationViews:


Adds an array of annotation views to the container.

- (void) addRecordAnnotationViews:(NSArray*)view; 
Parameters
view

The array of views to add to the container.


getRecordAnnotations


Returns the SGRecordAnnotations of all annotation views held by the container.

- (NSArray*) getRecordAnnotations; 
Return Value

The annotations within the container.


getRecordAnnotationViews


 Returns the record views associated with the container.

- (NSArray*) getRecordAnnotationViews; 
Return Value

The record views associated with the container.


isEmpty


Determines whether the container is empty.

- (BOOL) isEmpty; 
Return Value

YES if the container is empty; otherwise NO.


removeAllAnnotationViews


 Removes all annotations views held by the container.

- (void) removeAllAnnotationViews; 


removeAnnotationView:


Removes a annotation view from the container.

- (void) removeAnnotationView:(SGAnnotationView*)view; 
Parameters
view

The view to remove.


shouldAddViews:


This method is called before annotation views are added to the container. The default return value is YES.

- (BOOL) shouldAddViews:(NSArray*)views; 
Parameters
views

The annotation views that will be added to the container.

Return Value

YES if the views should be added to the container. Otherwise, NO.

Properties

arView

The SGARView that controls the container.

highlightedImage

The image that represents the container in its highlighted state.

normalImage

The image that represents the container in its normal state.


arView


The SGARView that controls the container.

@property (
    nonatomic,
    readonly) SGARView* arView; 


highlightedImage


The image that represents the container in its highlighted state.

@property (
    nonatomic,
    retain) UIImage* highlightedImage; 
Discussion

When a container experiences a UIControlEventTouchDrageEnter control event, it will present this image. Set this proper to nil if you do not wish to have the container highlighted.


normalImage


The image that represents the container in its normal state.

@property (
    nonatomic,
    retain) UIImage* normalImage; 
Discussion

Setting this property will resize the container to the size of the image. If nil is passed, then the size will stay the same.

© SimpleGeo Last Updated: 03/31/2010