Search code examples
ipadios8uiactionsheet

ActionSheet with one button issue with ios 8


In my application i found that actionsheet is not displaying properly, so i create fresh demo project with single view and one button on button action i have write code like

-(IBAction)testActionsheet:(id)sender{
    UIActionSheet *objAction=[[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"ActionSheet issue",nil];
    [objAction showFromRect:CGRectMake(300, 500, 90, 9) inView:self.view
               animated:YES];
}

but is show some cut from top side... do any one have solution for this, with actionsheet?


Solution

  • UIActionSheet is deprecated in iOS 8. please check this link UIActionSheet is deprecated in iOS 8

    you can use UIAlertController instead of actionsheet

    UIAlertController