uialertview - How to create an alertview with search bar in iphone? -
I want to display an alert view on it with a search bar option. Please help me, how can I create a search bar in an alert scene? Any sample code would be more helpful to me.
Thank you
I created a search bar and the text box has its subview Has been added in the form.
UIAlertView * myAlertView = [[UIAlertView alloc] initWithTitle: @ "" Message: @ "" Representative: cancel selfButtonal: zero other buttonlets: zero, zero]; UISearchBar * myTextField = [[UISearchBar Alok] initWithFrame: CGRectMake (30.0, 35.0, 180.0, 35.0)]; UIButton * searchbtn = [[UIButton alloc] initWithFrame: CGRectMake (230.0, 35.0, 40.0, 35.0)]; [MyTextField setBackgroundColor: [UIColor whiteColor]]; [MyAlertView SetbackGram Color: [UIColor grayColor]]; [Searchbtn setBackgroundColor: [UIColor grayColor]]; [MyAlertView addSubview: myTextField]; [MyAlertView adsviewview: searchbtn];
If there is any other better way please tell me.
Comments
Post a Comment