-1

I have been working on custom UIAlertViews and UIActionSheets for too long, so I would really appreciate any help.

I am trying to achieve an UIActionSheet as the UIAlertView shown in the picture below. How am I supposed to do that? I tried to use a UIView, which comes up halfway but that did not fit my expectations.

The colors shall be maintained (some kind of dark red or whatever it is) and (if possible) the block-style as well.

Thanks for your help, I am really desperate :-(

Do please understand that my english is not that good...

enter image description here

Nimit Parekh
  • 16,021
  • 8
  • 47
  • 70
paat1
  • 21
  • 1

1 Answers1

-1

You need to do all for Custom things, For Ex : Just for a UIbutton

UIAlertView *av = [[UIAlertView alloc] init];
[av addButtonWithTitle:@""];
UIButton *yesButton = [av.subviews lastObject];
[yesButton setHidden:YES];

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[av addSubview:button];
[av show];

[button setImage:[UIImage imageNamed:@"test.png"] forState:UIControlStateNormal];
[button addTarget:av action:@selector(someAction:) forControlEvents:[yesButton allControlEvents]];
[button setFrame:yesButton.frame];
Kumar KL
  • 15,086
  • 9
  • 36
  • 57
  • Thank you for the fast response, but I was looking for some code to get started with UIActionSheets. :-) – paat1 Dec 02 '13 at 10:28
  • Not an answer at all, not even working code on iOS 7 (cannot access subviews on `UIAlertView`). – Sulthan Dec 02 '13 at 12:00
  • @Sulthan : Ok.. then Can you check this link **http://stackoverflow.com/questions/10828977/customizing-the-buttons-on-a-uialertview** – Kumar KL Dec 02 '13 at 12:04
  • @Sulthan : Ok I agree with your comment, I didn't check for the IOS7 . – Kumar KL Dec 02 '13 at 12:10