title: Should I be able to add a class to a singleton?
body: <p>I have created a singleton class 'ArrayManager', which does pretty much as it sounds, just for holding and retaining data that must not disappear, while being visible to many other classes. The NSMutableArray *cellArray works as expected, no problem there. </p>
  
  <p>For convenience,  I (attempted) to add a pointer to the class 'MapProps' to the class 'Array Manager'. My thought is as long as I'm just keeping a pointer retained there should be no problem, but Main swears theres no visible interface for it. </p>
  
  <p>I'm still new to objective-c, so maybe I'm on track and it's just a syntax error, or perhaps I'm completely off base. Can some give some feedback as to why this is happening? 
      //MapProps.h<br>
      #import </p>
  
  <pre><code>@interface MapProps : NSObject{
      int pixelsX;
      int pixelsY;
      int tileSize;
      int rowsMax;
      int columnsMax;
  };
  @property int pixelsX,pixelsY,tileSize,rowsMax,columnsMax;
  -(void)setPixelsX:(int)x andPixelsY:(int)y withTilesize:(int)tiles;
  -(void)displayValues;
  @end
  
  
  //MapProps.m
  @implementation MapProps
  @synthesize pixelsX,pixelsY,tileSize,rowsMax,columnsMax;
  
  -(void) setPixelsX:(int)x andPixelsY:(int)y withTilesize:(int)tiles {
      [self setPixelsX:x];
      [self setPixelsY:y];
      [self setTileSize:tiles];
      [self setRowsMax:(pixelsX/tileSize)];
      int yScalar = (.875 * tileSize);
      [self setColumnsMax:(pixelsY/yScalar)];
      [self displayValues];
  };
  
  -(void)displayValues {
      NSLog(@"PixelsX=%d PixelsY=%d ",pixelsX,pixelsY);
      NSLog(@"TileSize=%d",tileSize);
      NSLog(@"RowsMax=%d ColumnsMax=%d",rowsMax,columnsMax);
  };
  @end
  
  
  
  
  //ArrayManager.h
  #import &lt;Foundation/Foundation.h&gt;
  @class MapProps; // include map properties
  
  @interface ArrayManager : NSObject{
      NSMutableArray *cellArray;
      MapProps *mapProps; 
  }
  @property (nonatomic,retain) NSMutableArray *cellArray;
  @property (nonatomic,retain) MapProps *mapProps;
  
  
  +(id)sharedArrayManager;
  -(void)setIntAtIndex:(int)index withValue:(int)value;
  -(int)getIntAtIndex:(int)index;
  @end
  
  
  #import "ArrayManager.h"
  #import "MapProps.h"
  
  @implementation ArrayManager
  @synthesize cellArray;
  @synthesize mapProps;
  
  
  +(id)sharedArrayManager{
      static id sharedArrayManager = nil;
  
      if (!sharedArrayManager){
          sharedArrayManager = [[self alloc]init];
      }
      return sharedArrayManager;
  }
  
  -(id)init{
      self = [super init];
      if (self){
          mapProps = [[MapProps alloc]init];
          cellArray=[[NSMutableArray alloc]init];
  
          for (int i=0; i &lt;=600; i++) {
              [cellArray addObject:[NSNumber numberWithInt:i]];
          };
  
      }
      return self;
  };
  
  -(void)setIntAtIndex:(int)index withValue:(int)value{
      [cellArray replaceObjectAtIndex:index withObject:[NSNumber numberWithInt:value]];
  };
  
  -(int)getIntAtIndex:(int)index{
      return ([[cellArray objectAtIndex:index] intValue]);
  };
  @end
  
  
  
  
  //Main
  int main(int argc, const char * argv[])
  {
  
      @autoreleasepool {
          int x;
          ArrayManager *arrayManager = [ArrayManager sharedArrayManager];
  
          [arrayManager.cellArray replaceObjectAtIndex:1 withObject:[NSNumber               numberWithInt:5]];
          x = [[arrayManager.cellArray objectAtIndex:1] intValue];
          NSLog(@"you got %d",x);
  
          [arrayManager setIntAtIndex:2 withValue:2];
          x = [arrayManager getIntAtIndex:2];
  
           NSLog(@"you got %d",x);
  
      [arrayManager setPixelsX:320 andPixelsY:480 withTilesize:16]; 
  </code></pre>
  
  <p>here I get the message 'no visible @interfor ArrayManager....</p>
  
  <pre><code>    }
      return 0;
  }
  </code></pre>
  
  <p>Now, yes, there are other ways to do what I want to here. But in this case, I'd really like to understand and create the best code possible.  </p>