2

I have a Button Add. which will add images from Gallery and Camera.

enter image description here

I want to show this UIVIew from ryt corner and it will expand from 1 to 2 to 3 and to final stat 4. like a baloon . and it will hide as same, from 4 to 3 to 2 to 1.

I have used this animation but this is not what i want ( balloon popover)

/*[UIView beginAnimations:@"" context:NULL];

        //The new frame size
        [AddImagesToCanvasView setFrame: CGRectMake(224,185,175,132)];

        //The animation duration
        [UIView setAnimationDuration:2.0];

        [UIView setAnimationDelay: UIViewAnimationCurveEaseIn];

        [UIView commitAnimations];*/
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
Zohaib
  • 2,845
  • 2
  • 23
  • 33

1 Answers1

0

just change the frames and radious which you want.. also add image in background if you want to display like a ballon with ballon image see code..

UIView *popUpView = [[UIView alloc] initWithFrame:view1.frame]; ///add the frame with requirement e.g view1,view2

popUpView.alpha = 0.0;
popUpView.layer.cornerRadius = 5;
popUpView.layer.borderWidth = 1.5f;
popUpView.layer.masksToBounds = YES;
[self.view addSubview:popUpView];

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.4];
[popUpView setAlpha:1.0];
[UIView commitAnimations];
[UIView setAnimationDuration:0.0];

UPDATE:

also see the custom popover view from bellow link..

  1. PopupView

  2. alpopoverview

    i hope this help you...

Community
  • 1
  • 1
Paras Joshi
  • 20,427
  • 11
  • 57
  • 70
  • cornerRadius borderWidth borderWidth. giving error that these cannot be found in forward class objec CALayer. – Zohaib Nov 22 '12 at 07:47
  • @Zohaib `#import ` – fphilipe Nov 22 '12 at 07:49
  • @Paras Joshi. i used what u said but its not coming as what i what its just coming like from dim view to dark view. its not like popover. – Zohaib Nov 22 '12 at 08:03
  • just set color and also images which you want and if you set image back of view the clear the background color of poupview and also set the control in this view which you want.. – Paras Joshi Nov 22 '12 at 08:11
  • i did , i used UIView which i want to show like popover and image is also set. but when i click add button UiVIew appears from fade to dark – Zohaib Nov 22 '12 at 08:18
  • @Zohaib just add this line mate.. popUpView.alpha = 1; [popUpView setBackgroundColor:[UIColor redColor]]; and check you will see the view – Paras Joshi Nov 22 '12 at 08:39