ios – No seen @interface for ‘NSObject’ declares the selector ‘objectAtIndex:’

0
7


sorry upfront, I am new on goal C, I am attempting to iterate an array, however this error comes : **No seen @interface for ‘NSObject’ declares the selector ‘objectAtIndex:’
**

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    CGFloat top = 0;

    for ( NSObject *j in _elements) {

      top = [j objectAtIndex:1]; // Error: No seen @interface for 'NSObject' declares the selector 'objectAtIndex:'
      

    }
    
    return top;
}

I additionally tried this (one other error seems):

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    CGFloat top = 0;

    for ( id j in _elements) {

        top = [ j objectAtIndex:1]; // Error: Assigning to 'CGFloat' (aka 'double') from incompatible kind 'id'
        

    }
    
    return top;
}

ty a lot on your assist

LEAVE A REPLY

Please enter your comment!
Please enter your name here