UIImageview 从 maindelegate 加载
我尝试从 maindelegate 加载 uiimageview,这样我就可以稍后在加载的每个视图中分配它...但是当我将局部变量分配给 maindelegate 变量时,图像不会显示!当我在视图内初始化 uiimageview 而不是从 maindelegate 时,图像加载正确!
我在 viewdidappear、viewdidload、viewwillappear 等中添加了以下代码 imageview1.image=maindelegate.imageview2.image 没有任何反应
当我输入这段代码时 uiimage *image1; imageview1.image=image1; 它可以工作
,但我想在应用程序启动时从 maindelegate 加载它!有人遇到同样的问题吗?任何帮助表示赞赏。
I try to load an uiimageview from the maindelegate so i can assign it later in each view that loads...but when i assign the local variable to the maindelegate variable the image does not show up! The image loads correctly when i initialize the uiimageview inside the view and not from maindelegate!
i have added the below code in the viewdidappear,viewdidload,viewwillappear etc
imageview1.image=maindelegate.imageview2.image
nothing happens
when i put this code
uiimage *image1;
imageview1.image=image1;
it works
but i want to load it from the maindelegate when the app starts! does anyone experience the same problem? any help appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我忘记正确初始化它了!
I have forgotten to initialize it correctly!