将图像添加到其他视图中的按钮
在我的应用程序中,我有两个视图控制器,并且两个都有表视图。两个表视图都有显示某些图像的特定按钮。现在我尝试使用 UIPopOverController 通过视图 A 将新图像设置到视图 B 中的按钮。为此我创建了B 类的对象,然后像这样完成。
[ObjB.button setImage:[UIImage imageNamed:@"1.png" forstate:UIControlStateNormal];
但我无法在按钮上获取新图像。可能的原因是什么。请帮助。任何帮助将不胜感激。
谢谢, 克里斯蒂
In my app i have two view controllers and have table view in both.Both table view have certain button showing certain images .Now i am trying to set a new image to a button in view B through view A using UIPopOverController.for this i created an object of class B and then done like this.
[ObjB.button setImage:[UIImage imageNamed:@"1.png" forstate:UIControlStateNormal];
but i am not able to get the new image on the button.What could be the possible reason.Please help.Any help will be appreciated.
Thanks,
Christy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您从 popovercontroller 转到 View B 时,请保留 B 控制器对象。
when you are going from popovercontroller to View B retain the B controllers object.