且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在iphone的imageview中显示图像

更新时间:2022-12-30 09:00:04

首先,您要将图像 1 添加到 imageview 2 - 您确定吗?想这样做吗?

First of all, you're adding the image 1 to imageview 2 - are you sure you want to do this?

其次,您需要将 imagview 添加到视图层次结构中,例如将其添加到 ViewControllers 视图中,如下所示:[[self view] addSubview:imageview1](如果此代码为位于视图控制器类中).

Secondly, you need to add the imagview to the view hierarchy, for example by adding it to a ViewControllers view, like this: [[self view] addSubview:imageview1] (If this code is situated within the View Controller class).