本文介绍了将图像添加到UIActionSheet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将图像添加到UIActionSheet?
How to Add image into UIActionSheet?
推荐答案尝试一下:
(void)willPresentActionSheet:(UIActionSheet *)actionSheet{ UIImageView* df = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yourpic.png"]]; df.center [actionSheet addSubview:df]; //scale image aspect to fit image view df.contentMode = UIViewContentModeScaleAspectFit; //change width of frame CGRect frame = df.frame; frame.size.width = 50; df.frame = frame; }它将如图所示调整其大小.
It will resize it as shown.
更多推荐
将图像添加到UIActionSheet
发布评论