본문 바로가기

Mobile/iOS

iOS 03.1 / Xcode 5.1.1 NSmutableArray

NSmutableArray

-(void) addObject: (id)anObject;

현재 배열에 anObject를 추가한다.

//id형은 모든 것을 다 받아들인다. 문자, 숫자, 배열, 딕셔너리 등

 

-(void) addObjectsFromArray: (NSArray*)otherArray;

현재 배열에 otherArray를 추가한다.

 

-(void) insertObject: (id)anObject atIndex: (unsigned)index;

현재 배열의 index 위치에 anObject를 추가한다.

 

-(void) removerObjectAtIndex: (unsigned)index;

현재 배열의 index 위치의 객체를 삭제한다.

 

-(void) replaceObjectAtIndex: (unsigned)index withObject: (id)andObject;

현재 배열의 index 위치의 객체요소를 anObject로 대체한다.

 

 


성남스마트앱창작터 수업3일차