Note that there are some explanatory texts on larger screens.

plurals
  1. POSubView slide in animation, iphone
    text
    copied!<p>I have a UIview Containing two UIButtons. </p> <pre><code>-(void)ViewDidLoad { geopointView = [[UIView alloc] initWithFrame:CGRectMake(0, 350, 120, 80)]; geopointView.backgroundColor = [UIColor greenColor]; UIButton *showGeoPointButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; showGeoPointButton.frame = CGRectMake(0, 0, 120, 40); showGeoPointButton.titleLabel.font = [UIFont systemFontOfSize:13.0]; [showGeoPointButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [showGeoPointButton addTarget:self action:@selector(showPlaces:) forControlEvents:UIControlEventTouchUpInside]; UIButton *SaveButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain] SaveButton.frame = CGRectMake(0, 40, 120, 40); SaveButton.titleLabel.font = [UIFont systemFontOfSize: 15.0]; [SaveButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [SaveButton addTarget:self action:@selector(savePlacePopUp) forControlEvents:UIControlEventTouchUpInside]; [geopointView addSubview:showGeoPointButton]; [geopointView addSubview:SaveButton]; } </code></pre> <p>I want to animate slide in of UIview when following method is called. </p> <pre><code>-(void) showAnimation </code></pre> <p>I tried to do it by following way but I can see no animation. How can I do it?</p> <pre><code>-(void) showAnimation{ [UIView animateWithDuration:10.0 animations:^{ [self.view addSubview:geopointView]; }]; } </code></pre> <p>Thannks for any help in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload