ios7 - iOS 7: Change height of UIAlertView -
i've gone through several posts explaining how change alert view height none of worked me. here scenario:
i inserting custom view inside alert view this:
myviewcontroller *myviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier: @"myview"]; uialertview *alertview = [[uialertview alloc] initwithtitle:nil message:nil delegate:self cancelbuttontitle:@"cancel" otherbuttontitles:@"submit", nil]; [alertview setvalue: myviewcontroller.view forkey:@"accessoryview"]; [alertview show]; after adding custom view (i.e. myviewcontroller.view), size of alert view increased unnecessarily. set desired size alert view, implemented following method:
- (void)willpresentalertview:(uialertview *)alertview { [alertview setframe:cgrectmake(0, 0, 280, 300)]; } still there no change in alert view height. ideas how can that? please help
problem solved..!! changed height of sub view. inside viewdidload method of myviewcontroller adjusted size of view.
Comments
Post a Comment