adding image to a button in other View

自作多情 提交于 2019-12-11 06:17:46

问题


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


回答1:


when you are going from popovercontroller to View B retain the B controllers object.



来源:https://stackoverflow.com/questions/6329724/adding-image-to-a-button-in-other-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!