i want show popup if click button on toolbar. using ios 8 sdk.
i using below code same, want remove title it.
uiactionsheet *actionsheet = [[uiactionsheet alloc] initwithtitle:[appdelegate enctitle] delegate:self cancelbuttontitle:nil destructivebuttontitle:nil otherbuttontitles:@"add bookmark", @"cancel",nil]; actionsheet.actionsheetstyle = uiactionsheetstyledefault; actionsheet.cancelbuttonindex = 1; // make second button red (destructive) [actionsheet showinview:self.view]; // show our table view (pops in middle of table) [actionsheet release];
if use initwithtitle:@"" title block comes in popup.
currently below image
want achieve this
please me fix issue.
after using uialertviewcontroller suggested sweetangel, coming in iphone 4s....please show in devices.
if using ios 8, can try 1 :
uialertcontroller *alert1 = [uialertcontroller alertcontrollerwithtitle:nil message:nil preferredstyle:uialertcontrollerstyleactionsheet]; uialertaction* ok = [uialertaction actionwithtitle:@"add bookmark" style:uialertactionstyledefault handler:^(uialertaction * action) { // code bookmark [alert1 dismissviewcontrolleranimated:yes completion:nil]; }]; uialertaction* cancel = [uialertaction actionwithtitle:@"cancel" style:uialertactionstyledefault handler:^(uialertaction * action) { [alert1 dismissviewcontrolleranimated:yes completion:nil]; }]; [alert1 addaction:ok]; [alert1 addaction:cancel]; [self presentviewcontroller:alert1 animated:yes completion:nil];
Comments
Post a Comment