如何在UIActionSheet上放置图像

如何在UIActionSheet上放置图像

本文介绍了如何在UIActionSheet上放置图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将图像放在UIActionSheet文本的正确位置.就像苹果音乐播放器中给出的一样.

How to put image on UIActionSheet on right position of text. Like given in apple music player.

注意:请不要使用自定义视图进行回答,如果可以在UIActionSheet中使用,请告诉我们.

Note: Don't answer with custom view, if it is possible in UIActionSheet, Kindly let us know.

推荐答案

那么您实际上就是在禁止任何人回答,因为这就是您所做的.

Then you are effectively forbidding anyone to answer, because that is what you do.

首先,没有UIActionSheet这样的东西.它在四年前被弃用.今天,我们使用UIAlertController.

First of all, there is no such thing as UIActionSheet. It was deprecated four years ago. Today we use UIAlertController.

UIAlertController只是一个预先打包的呈现视图控制器.它没有您无法做的什么.它也是故意非常简单和有限的.因此,如果您想做一些超出UIAlertController给您的限制的事情,那么您只需创建一个自定义的呈现视图控制器即可.添加动画和变暗视图"以使其看起来像标准操作表是很容易的.只需制作一个自定义过渡动画即可.

UIAlertController is nothing but a prepackaged presented view controller. It does nothing that you could not do for yourself. It is also deliberately very simple and limited. So if you want to do something that goes beyond the limits what UIAlertController gives you, then you simply create a custom presented view controller. Adding the animation and "dimming view" to make it look like a standard action sheet is easy; just make a custom transition animation.

这就是屏幕快照中显示的界面.它不是UIActionSheet.它不是UIAlertController.这只是Apple创建的自定义呈现视图控制器.你也可以.

That is what the interface shown in your screen shot is. It is not a UIActionSheet. It is not a UIAlertController. It's just a custom presented view controller that Apple has created. And so can you.

这篇关于如何在UIActionSheet上放置图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:31