How do they do it? ... avoiding the boring standard iPhone app with cookie cutter

I am trying to figure out the best design for a custom floating “pallet” to initiate actions (for example, change the sort criteria for a list), as well as switch views (for example, Help, Options). I want the pallet to begin to drop, so the initial view looks full-screen. When the user touches the corner of the screen, the view slides into place with the animation. Another contact will shift your gaze to the side.

The best UI example I'm going to do is one of my favorite apps - iThoughts mind mapper (see below). How it's done? I really want to know how pros create such beautiful applications. Most of the help that I find points me towards the standard UITabbar, UIToolbar, etc. Yawn

Thank!

alt textalt text

+3
source share
2 answers

Assumptions:

  • You want to liven up a show called toolbar.
  • You saved the coordinates of the frame to represent the toolbar for your off-screen state in the property CGRect toolbarFrameWhenHidden. Accordingly, it CGRect toolbarFrameWhenShowncontains the frame coordinates for the displayed state.
  • BOOL toolbarHidden, .
  • , , / toggleToolbar:.

:

- (IBAction) toggleToolbar:(id)sender
{
    CGRect targetFrame = self.toolbarHidden ? self.toolbarFrameWhenShown : self.toolbarFrameWhenHidden;
    [UIView animateWithDuration:0.25 animations:^{
        self.toolbar.frame = targetFrame;
    }];
    self.toolbarHidden = !self.toolbarHidden;
}
+1

, . . . , Core Animation .

+4

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


All Articles