How to create a floating panel for iPhone / iPad?

I am working on a raster editor application for iPad / iPhone, and I would like to have a floating toolbar that the user can move around the canvas of the drawing so that it does not interfere with the drawing surface. I would use the standard UIToolbar, but I would like the toolbar to have a kind of zoom navigation that would not be elegant in the standard UIToolbar.

  • At a high level, how can I create a floating toolbar?
  • Is there a standard iPhone control for creating a floating panel?
  • I have not seen anything in the User Interface Guide, but is this a normal control, a frowning app store?

Thank you for your help!

+3
source share
1 answer

There is no floating toolbar in the SDK, but you can certainly make your own.

Create a new subclass of UIView and draw your toolbar (or use the existing UIToolBar if it does what you need, but as a subspecies of your custom view).

Then capture the touch events in your user view so that the user can move the floating panel by dragging it with a finger.

Many of the best apps for the iPhone and iPad have user controls, so this is certainly not a disapproval.

+3
source

Source: https://habr.com/ru/post/1751319/


All Articles