ios pass values during a segue to another view

后端 未结 5 757
暗喜
暗喜 2020-12-24 12:15

Trying to do something I\'ve seen documented in a lot of places, but can\'t seem to manage. I\'m trying to pass data from one view to another during a segue.

Here\'s

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 13:15

    You don't need to create a local instance variable of the destination view controller. This will do the same:

    [segue.destinationViewController setLocTitle: [myValue valueForKeyPath:@"title"];
    [segue.destinationViewController setLocInfo: [myValue valueForKeyPath:@"info"];
    

提交回复
热议问题