Pass NSMutableArray to one view controller to another

前端 未结 6 1311
-上瘾入骨i
-上瘾入骨i 2020-12-22 13:49

I am trying to pass a NSMutableArray between two view controller. Please let me know what can i do for this

In the PlaylistViewController.h file I have



        
6条回答
  •  北海茫月
    2020-12-22 14:44

    Make property of your NSMutableArray and synthesize it.

    And this after making object of your class.

    PlaylistViewController *PLVC = [[PlaylistViewController alloc] init];
    PLVC.SongArray=yourAry;
    [self.navigationController pushViewController:PLVC animated:YES];
    

提交回复
热议问题