tags:

views:

614

answers:

1

How to Add image into UIActionSheet?

+1  A: 

Hi Mike,

Try this:

(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.

Alex