将值从UIViewController传递给UIView - 来<null>总是</null>

时间:2013-08-16 08:34:21

标签: ios objective-c uiview uiviewcontroller

我有UIViewControllerXXX.h.m

@property(atomic,retain) id dPgmDetails; //(View Controller)

我在UIView上面有yyy.h .mUIViewController

@property(atomic,retain) id dJson; 

我尝试将json响应作为id从视图控制器发送到以下视图...

yyy(view Object).dJson = dPgmDetails; //(view)

但它在视图控制器之间工作,而不是在视图控制器之间查看。亲切地向我建议解决方案!提前谢谢。

1 个答案:

答案 0 :(得分:0)

我想你忘了合成了

  UIView , yyy.h
  @property(nonatomic,retain) id dJson; //put nonatomic

 //yyy.m file
 @synthesize dJson; //synthesize it 



//in XXX.m
(view object).dJson =  dPgmDetails;


希望这有助于:)