如何像报纸一样创建包含图像和文本的视图? [英] How to create a view which contain image and text as like newspaper has?

查看:123
本文介绍了如何像报纸一样创建包含图像和文本的视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个包含图像和文本的视图,就像报纸一样。

I want to create a view which contains image and text, like a newspaper has.

例如,在320像素宽度中,一个200 x 100图像。图像位于视图的左侧,右侧和底部的剩余空间将包含文本。

For example, in 320 pixel width, a 200 x 100 image. The image is on the left side of the view, and the remaining space on the right side and bottom will contain text.

推荐答案

您可以通过设置框架来按照您希望的方式排列UIImageViews和UITextViews。然后将图像分配给imageViews并将文本分配给textViews。

You arrange UIImageViews and UITextViews in the way you want them by setting their frames. Then assign images to the imageViews and text to the textViews.

这篇关于如何像报纸一样创建包含图像和文本的视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆