Ios7 UIAlertView从右上角淡入如何停止

Ios7 UIAlertView从右上角淡入如何停止,ios7,uialertview,subview,Ios7,Uialertview,Subview,我已经添加了一个scrollview作为子视图,当单击按钮时,它会下降到我的视图中,但当我单击注销按钮时,UIAlertView的行为在我添加它后发生了变化。单击注销时,UIAlertView从右上角淡入。不明白为什么行为发生了变化,或者为什么会这样做,有什么想法吗 @synthesize scrollView; @synthesize showMenu; - (id)initWithStyle:(UITableViewStyle)style { self = [super initWithS

我已经添加了一个scrollview作为子视图,当单击按钮时,它会下降到我的视图中,但当我单击注销按钮时,UIAlertView的行为在我添加它后发生了变化。单击注销时,UIAlertView从右上角淡入。不明白为什么行为发生了变化,或者为什么会这样做,有什么想法吗

@synthesize scrollView;
@synthesize showMenu;

- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
    // Custom initialization
}
return self;
}

- (void)viewDidLoad
{
[super viewDidLoad];

    self.title = @"Members Area";

showMenu = false;

[self.view addSubview:scrollView];

}

- (IBAction)LogOut:(id)sender{
UIAlertView *logoutMessage = [[UIAlertView alloc] initWithTitle:@"Logout"
message:@"Are you sure you want to logout?"
delegate:self
cancelButtonTitle:@"No"
otherButtonTitles:@"Yes", nil];
[logoutMessage show];
}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];

if([title isEqualToString:@"No"])
{
    //NSLog(@"You clicked No");
}
else if([title isEqualToString:@"Yes"])
{
    //NSLog(@"You clicked Yes");
    [self performSegueWithIdentifier:@"LogoutView" sender:self];

}
}

- (IBAction)DropDownMenuMembers:(id)sender{


if (showMenu == false) {

    showMenu = true;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationDelay:0.0];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];

    [UIButton beginAnimations:nil context:nil];
    [UIButton setAnimationDuration:0.5];
    [UIButton setAnimationDelay:0.0];
    [UIButton setAnimationCurve:UIViewAnimationCurveEaseInOut];

    scrollView.frame = CGRectMake(0, 0, 320, 100);
   // openMenu.frame = CGRectMake(267,101, 47, 30);

    [self.view bringSubviewToFront:scrollView];
    [UIView commitAnimations];

}
else{

    showMenu = false;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationDelay:0.0];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

    [UIButton beginAnimations:nil context:nil];
    [UIButton setAnimationDuration:0.5];
    [UIButton setAnimationDelay:0.0];
    [UIButton setAnimationCurve:UIViewAnimationCurveEaseInOut];

    scrollView.frame = CGRectMake(0, -100, 320, 100);
    //openMenu.frame = CGRectMake(262, 20, 47, 30);

    [UIView commitAnimations];

}



}

动画出现问题,这解决了问题: