Add UIPickerView & a Button in Action sheet - How?

后端 未结 11 1443
遥遥无期
遥遥无期 2020-11-22 15:40

My application requires following things to be added in an action sheet.

  • UIToolbar
  • Button on UIToolbar
  • UIPicker Control

I have

11条回答
  •  抹茶落季
    2020-11-22 16:22

    To add to marcio's awesome solution, dismissActionSheet: can be implemented as follows.

    1. Add an ActionSheet object to your .h file, synthesize it and reference it in your .m file.
    2. Add this method to your code.

      - (void)dismissActionSheet:(id)sender{
        [_actionSheet dismissWithClickedButtonIndex:0 animated:YES];
        [_myButton setTitle:@"new title"]; //set to selected text if wanted
      }
      

提交回复
热议问题