UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Enter Student Name" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save", @"Save and Add", nil];
alert.tag = 1;
alert.transform=CGAffineTransformMakeScale(1.0, 0.75);
alert.alertViewStyle=UIAlertViewStylePlainTextInput;
[alert show];
-(void)willPresentAlertView:(UIAlertView *)alertView {
if (alertView.tag == 1) {
for (UIView *view in alertView.subviews) {
if ([view isKindOfClass:[UITextField class]]||
[view isKindOfClass:[UIButton class]] || view.frame.size.height==31) {
CGRect rect=view.frame;
rect.origin.y += 65;
view.frame = rect;
}
}
}
}
As i am showing alertview with textfield and three buttons its working fine in ios 7 but not in ios 6 .
have a look at both ios images -- >
as you all can see the alertview of ios 6 is disturbed ... but i am not getting what i am doing wrong there .
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…