摘要:
情景描述: 1. 有两个viewController,一个是A,一个是B。 2. A,B上各有一个按键,点击它们后分别会跳向对方。 3. 想要实现在B中返回A的时候可以更新A中的数据。代理实现: 1. 在B.h中声明一个代理协议(行15-19),在协议中定义要被代理的方法(行17);2. 在前面引用此协议(行1) 3. 声明代理属性(行4,8)1@protocolSecondViewControllerDelegate;2@interfacesecondViewController:UIViewController{34id<SecondViewControllerDelegate> 阅读全文
posted @ 2011-11-07 10:55
晃晃悠悠
阅读(320)
评论(0)
推荐(0)
浙公网安备 33010602011771号