Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a floating toolbar for an iPhone/iPad app?

I'm working on a bitmap editor app for the iPad/iPhone and I'd like to have a floating toolbar that the user can move around the drawing canvas so it doesn't get in the way of the drawing surface. I'd use a standard UIToolbar, but I'd like the toolbar to have a zoom navigation view, which wouldn't fit elegantly in a standard UIToolbar.

  1. At a high level, how could I build a floating toolbar?
  2. Is there a standard iPhone UI control for creating a floating toolbar?
  3. I didn't see anything in the UI Guidelines, but is this kind of custom control frowned upon by the App store?

Thanks so much in advance for your help!

like image 563
BeachRunnerFred Avatar asked Jan 24 '26 03:01

BeachRunnerFred


1 Answers

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

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

Then capture the touch events into your custom view so the user can move the floating toolbar by dragging it with his finger.

Many of the best iPhone and iPad apps have custom controls so this is certainly not frowned upon.

like image 170
user342492 Avatar answered Jan 25 '26 18:01

user342492



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!