logo
  • 教程列表
  • SO官方文檔
  • NSMutableArray 裡
    • 排序陣列
    • 建立 NSMutableArray
    • 新增元素
    • 插入元素
    • 刪除元素
    • 將物件移動到另一個索引
    • 使用 Predicate 過濾陣列內容
  1. StackOverflow 文件
  2. Objective-C Language 教程
  3. NSMutableArray 裡
  4. 插入元素

插入元素

Created: November-22, 2018

NSMutableArray *myColors;
int i;
int count;
myColors = [NSMutableArray arrayWithObjects: @"Red", @"Green", @"Blue", @"Yellow", nil];
[myColors insertObject: @"Indigo" atIndex: 1];
[myColors insertObject: @"Violet" atIndex: 3];
  • 刪除元素
  • 新增元素

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明