Q:

Textfield in alertview not working in ios7?

I have an application in which I'm using a specific design for a reason. I put a text field in an alert view above an otherbutton with a background image. Everything is working fine in ios 6 version.
UIAlertView *av=[[UIAlertView alloc] initWithTitle:@"fdhdj" message:@" hdfjkhfjkhdk" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:@" ",@"cancel",nil];
     av.alertViewStyle = UIAlertViewStylePlainTextInput;
 namefield = [[UITextField alloc] initWithFrame:CGRectMake(10.0,43.0, 264.0, 44.0)];
    namefield.borderStyle = UITextBorderStyleNone;
    namefield.background = [UIImage imageNamed:@"text_field_default.png"];
    namefield.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    namefield.textAlignment = UITextAlignmentCenter;
    //[namefield setBackgroundColor:[UIColor whiteColor]];
    [av addSubview:namefield];
    [namefield release];
    av.tag=12;
    av.delegate=self;  
    [av show];

    [av release];

But now in ios 7, I heard you can't easily alter the view hierarchy of a UIAlertView.
One alternative for this case is to set 

alert.alertViewStyle = UIAlertViewStylePlainTextInput

But can we add that text field in wherever we want? As in my case above the first otherbutton.can anybody help me?

A:

 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Enter Student Name" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save",nil];

 [alertView setAlertViewStyle:UIAlertViewStylePlainTextInput];
 [alertView show];

i used to do like this ,and its working very fine 

A:

The simple answer to your question is NO, you can't change anything in this testField for the UIAlertViewStylePlainTextInput and you shouldn't.
This is from Apple:

The UIAlertView class is intended to be used as-is and does not
  support subclassing. The view hierarchy for this class is private and
  must not be modified.

And unfortunately what you heard I heard you can't easily alter the view hierarchy of a UIAlertView  is wrong, you cannot alter the view hierarchy of a UIAlertView in iOS7 at all.
There are a good alternative on the web, you can check in cocoacontrols.com

