NSMutableArray(GBMutableArray) Category Reference
| Declared in | NSArray+GBArray.h NSArray+GBArray.m  | 
Tasks
Other Methods
- 
	
		
– push:Helper method for adding the given object to the end of the receiver. - 
	
		
– popHelper method to removing the last object from the receiver. - 
	
		
– peekHelper method for looking at the last object in the receiver. 
Other Methods
Instance Methods
peek
Helper method for looking at the last object in the receiver.
- (id)peekReturn Value
Returns the last object in the receiver.
Discussion
Internally, the method sends the receiver lastObject message and returns the result. If the receiver is an empty array, nil is returned.
Declared In
NSArray+GBArray.hpop
Helper method to removing the last object from the receiver.
- (id)popReturn Value
Returns the object removed from the receiver.
Discussion
Internally the method sends the receiver removeLastObject and returns the removed object. If receiver is an empty array, exception is raised.
Exceptions
- NSException
 - Raised if the receiver is an empty array.
 
Declared In
NSArray+GBArray.hpush:
Helper method for adding the given object to the end of the receiver.
- (void)push:(id)objectParameters
- object
 - The object to push to the end of the receiver.
 
Discussion
Internally the method sends the receiver addObject:, but using this method makes usage of array as stack more obvious.
Declared In
NSArray+GBArray.h