title: -[__NSArrayI objectForKeyedSubscript:]: unrecognized selector sent to instance IN xcode6 objective-c ios
body: <p>I am trying to learn objective-c, and came across some crash I couldn't resolve.
  I believe it's one of the basic problems, but I am new here and got lost in the middle.</p>
  
  <p>I have :</p>
  
  <ul>
  <li>ModelViewController.h</li>
  <li>ModelViewController.m</li>
  <li>Schedule.h</li>
  <li>Schedule.m</li>
  </ul>
  
  <p>in ModelViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface FetchScheduleVC : UIViewController 
      @property (copy, nonatomic) NSMutableArray *myMutableArray;
  @end
  </code></pre>
  
  <p>in ModelViewController.m</p>
  
  <pre><code>#import "ModelViewController.h"
  #import "Schedule.h"
  
  @implementation Model
  - (void)viewDidLoad {
      [super viewDidLoad];
      for(int i=0; i &lt; 3; i++){
          [_myMutableArray addObjects: [NSNumber numberWithInt: i]
      }
  }
  - (IBAction)saveBtn:(UIButton *)sender {
       Schedule *newSchedule = [[Schedule alloc]init];
      [newSchedule createClassFromArray: _myMutableArray];
  }
  @end
  </code></pre>
  
  <p>in Schedule.h</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface Schedule : NSObject
  @property (strong, nonatomic) NSMutableArray *classArray;
  -(void) createClassFromArray: (NSArray *) selectedArr;
  @end
  </code></pre>
  
  <p>in Schedule.m</p>
  
  <pre><code>#import "Schedule.h"
  
  @implementation Schedule
  -(void) createClassFromArray: (NSArray *) selectedArr {
      for(NSNumber *i in selectedArr){
      NSLog(@"number in array is : %@", i);
      }
  }
  @end
  </code></pre>
  
  <p>I simplified my codes a little, but the basic flow is the same.
  When I run this, and click a button to call - (IBAction)saveBtn:(UIButton *)sender, I get:</p>
  
  <pre><code>-[__NSArrayI objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7fcb61d2fd10
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7fcb61d2fd10'
  </code></pre>
  
  <p>Anything wrong doings in sending NSArray through Method up here?</p>