SGMovableStack


The view that appears when a drag event occurs over an SGAnnotationView in the AR enviornment.

Superclass: UIView
Declared In: SGMovableStack.h

Discussion

The movable stack will display its collected annotation views in a spilled card deck fashion. The first collected view will be on top of the other views.

To change how the stack is presented, override drawStackAtPoint:roll. This method will notify the stack when the origin of the stack has moved along with the orientation of the device.



Methods

-addAnnotationView:

Adds an annotation view to the stack.

-drawStackAtPoint:

Called everytime the stack is moved around on the SGARView .

-drawStackAtPoint:roll:

Called everytime the stack is moved around on the SGARView .

-emptyStack:

Removes all SGAnnotationViews from the stack.

-stack

 Returns an array of SGAnntationViews that are associated with the movable stack.


addAnnotationView:


Adds an annotation view to the stack.

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

The SGAnnotationView to add to the movable stack.

Discussion

If the movable stack is empty, adding an annotation view will add the stack as a subview of the SGARView.


drawStackAtPoint:


Called everytime the stack is moved around on the SGARView.

See Also:

drawStackAtPoint:roll:

- (void) drawStackAtPoint:(CGPoint)point roll:(double)roll; 
Parameters
point

The new point of the movable stack.

roll

The roll orientation of the device.

Discussion

Since the movable stack can move around as a subview of the SGARView, the position needs to be updated.


drawStackAtPoint:roll:


Called everytime the stack is moved around on the SGARView.

See Also:

drawStackAtPoint:

- (void) drawStackAtPoint:(CGPoint)point roll:(double)roll; 
Parameters
point

The new point of the movable stack.

roll

The roll orientation of the device.

Discussion

Since the movable stack can move around as a subview of the SGARView, the position needs to be updated.


emptyStack:


Removes all SGAnnotationViews from the stack.

- (void) emptyStack:(BOOL)stillCaptured; 
Parameters
stillCaptured

YES to keep the views alive in the AR enviornment. Otherwise; NO.

Discussion

When emptying a stack, there are two options. By passing in the value YES once the stack is emptied, the views will return back to the AR enviornment. If you specify NO, then the views will no longer be present in the AR enviornment.


stack


 Returns an array of SGAnntationViews that are associated with the movable stack.

- (NSArray*) stack; 
Return Value

 The views associated with the stack.

Properties

maxStackAmount

The maximum number of allowed SGAnnotationViews to collect. Defaults to 20.


maxStackAmount


The maximum number of allowed SGAnnotationViews to collect. Defaults to 20.

@property (
    nonatomic,
    assign) NSInteger maxStackAmount; 

© SimpleGeo Last Updated: 03/31/2010