Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: IOS Pull-up menu?


This question is answered.


Permlink Replies: 6 - Last Post: Oct 20, 2017 7:38 AM Last Post By: Ken Randall Threads: [ Previous | Next ]
Sean Hoffman

Posts: 126
Registered: 3/28/99
IOS Pull-up menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2017 12:41 PM
Does anyone have any experience making an IOS Pull-up menu for things like settings?
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: IOS Pull-up menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2017 1:43 PM   in response to: Sean Hoffman in response to: Sean Hoffman
Sean Hoffman wrote:

Does anyone have any experience making an IOS Pull-up menu for things like settings?

Can you describe what you're after in more detail? Are there existing apps on iOS that do what you want?

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Sean Hoffman

Posts: 126
Registered: 3/28/99
Re: IOS Pull-up menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2017 5:23 PM   in response to: Dave Nottage in response to: Dave Nottage
<snip>
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Hmm having a hard time finding an app that does it. Spotify sort of does it. Go to the search menu and click on the arrow that's about 1cm from the bottom of the screen. But in general it's a popular effect where you'll see sort of a "modal"-ish panel slide up and cover the main window. You would typically make your change or selection and then the panel would disappear.
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: IOS Pull-up menu? [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2017 8:02 PM   in response to: Sean Hoffman in response to: Sean Hoffman
Sean Hoffman wrote:

Hmm having a hard time finding an app that does it. Spotify sort of does it. Go to the search menu and click on the
arrow that's about 1cm from the bottom of the screen.

My Spotify (v8.4.22) doesn't do have an arrow near the bottom when search is selected.

But in general it's a popular effect where you'll see sort of a
"modal"-ish panel slide up and cover the main window. You would typically make your change or selection and then the
panel would disappear.

Animated "menus" aren't particularly difficult.

If you want the "menu" to be "modal"-ish, and not cover the entire screen, you could use something like a ListBox
inside a Frame where the Frame covers the whole screen and has HitTest set to True, thus preventing the user from
tapping anything under it when the "menu" is showing.

To animate it into view, you could have the layout start off being offscreen, then use TAnimator.AnimateFloatWait to
change Position.X or Position.Y, depending on which direction it is to be animated in. At the end of the animation, set
Align to TAlignLayout.Contents so that it fixes in place.

For animating the Frame "up", you could do something like:

  // Before animation
  Position.X := 0;
  Position.Y := Screen.Height; // Start "off screen"
  Width := Screen.Width;
  Visible := True;
  // Animate "up"
  TAnimator.AnimateFloatWait(Self, 'Position.Y', 0);
  // "Fix" the frame in place, in case rotation is supported
  Align := TAlignLayout.Contents;  


For the reverse:

  // "Unfix" the frame
  Align := TAlignLayout.None;  
  // Animate "down"
  TAnimator.AnimateFloatWait(Self, 'Position.Y', Screen.Height);
  Visible := False; 


You could also have a black-filled Rectangle inside the frame (under the ListBox, or whatever) with its Align property
set to Contents and its Opacity set to 0.5 so that everything in the background is dimmed.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Ken Randall

Posts: 130
Registered: 11/12/99
Re: IOS Pull-up menu? [Edit]
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2017 3:07 AM   in response to: Sean Hoffman in response to: Sean Hoffman
Sean Hoffman wrote:

Hmm having a hard time finding an app that does it. Spotify sort of
does it. Go to the search menu and click on the arrow that's about
1cm from the bottom of the screen. But in general it's a popular
effect where you'll see sort of a "modal"-ish panel slide up and
cover the main window. You would typically make your change or
selection and then the panel would disappear.

Have you tried using TMultiView?
Sean Hoffman

Posts: 126
Registered: 3/28/99
Re: IOS Pull-up menu? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2017 7:22 AM   in response to: Ken Randall in response to: Ken Randall
Ken Randall wrote:
Sean Hoffman wrote:

Hmm having a hard time finding an app that does it. Spotify sort of
does it. Go to the search menu and click on the arrow that's about
1cm from the bottom of the screen. But in general it's a popular
effect where you'll see sort of a "modal"-ish panel slide up and
cover the main window. You would typically make your change or
selection and then the panel would disappear.

Have you tried using TMultiView?

I have not tried TMultiView, but I do not want the settings page to be a "first-class" page. I want it to be a pop-up page that shows itself only when needed, and disappears the 99.999 percent of the time it's not needed.
Ken Randall

Posts: 130
Registered: 11/12/99
Re: IOS Pull-up menu? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2017 7:38 AM   in response to: Sean Hoffman in response to: Sean Hoffman
Sean Hoffman wrote:

I have not tried TMultiView, but I do not want the settings page to
be a "first-class" page. I want it to be a pop-up page that shows
itself only when needed, and disappears the 99.999 percent of the
time it's not needed.

Then I suggest that you do as it is what it is designed to do. There is
a sample app in
c:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object
Pascal\Multi-Device Samples\User Interface\MultiView
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02