passing data between views

后端 未结 3 1063
南方客
南方客 2020-12-11 10:20

So i\'m trying to pass data between two views (first view is tableViewController,when cell is pressed data is send to second view,second view got imageView, when data is sen

3条回答
  •  -上瘾入骨i
    2020-12-11 11:03

    First Check theAppDataObject is null or not.

    If it is null then:

    Write AppDataObject* theDataObject; in your inteface and declare a property as strong

    If theDelegate.theAppDataObject is returning null , allocate that object first.

    If it is not null then:

    Change this line theAppDataObject.imageString = tempImageString;

    to

    theAppDataObject.imageString = [tempImageString retain];
    

    If you are using ARC set the property of imageString to strong.

    or Check with this

    theAppDataObject.imageString = [[NSString alloc] initWthString:tempImageString];

提交回复
热议问题