Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

ios context menu (white background with blue or red menu items) - to do or already there?
Started by CoronaChris Jun 26 2018 11:38 PM

5 replies to this topic

Best Answer Rob Miracle , 27 June 2018 - 07:55 AM

You will need to code it yourself.  I'd create a display.newGroup(), add a mask that does the rounded corners to it, then insert a series of widget.newButton()'s drawn on top of display.newRect()'s 

 

Rob

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

CoronaChris

[GLOBAL: userInfoPane.html]
CoronaChris
  • Contributor

  • 152 posts
  • Corona SDK

Dear Corona members,

 

I had discovered the activity popup plugin recently and have since been looking for the best way to design the ios context menu which can be seen here:

 

4_iOS_file_context_menu.png

 

Correct me if I'm wrong, but the activity popup is not capable of creating a menu like this. Is there any other plugin I can use or do I have to code it all myself?

 

Thanks :)



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

  Best Answer

You will need to code it yourself.  I'd create a display.newGroup(), add a mask that does the rounded corners to it, then insert a series of widget.newButton()'s drawn on top of display.newRect()'s 

 

Rob



[TOPIC: post.html]
#3

CoronaChris

[GLOBAL: userInfoPane.html]
CoronaChris
  • Contributor

  • 152 posts
  • Corona SDK

You will need to code it yourself.  I'd create a display.newGroup(), add a mask that does the rounded corners to it, then insert a series of widget.newButton()'s drawn on top of display.newRect()'s 

 

Rob

Thx Rob, as always :)

 

Does your solution perform any better than two newRoundedRects (the bigger top one and the smaller bottom one) with buttons on top (all together in a group)?



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

You can do it that way, and use display.newLine()'s to separate the buttons, but my way makes the gap between the buttons transparent, but that may not be very important. To have the separate cancel button would involve a couple of display.newGroup()'s, one for the top part so you can mask it and one to hold that group and the cancel button. Your method would certainly be easier to implement.

 

Rob



[TOPIC: post.html]
#5

CoronaChris

[GLOBAL: userInfoPane.html]
CoronaChris
  • Contributor

  • 152 posts
  • Corona SDK

Appreciate your detailed answers. Thank you very much, Rob! All clear now :)



[TOPIC: post.html]
#6

CoronaChris

[GLOBAL: userInfoPane.html]
CoronaChris
  • Contributor

  • 152 posts
  • Corona SDK

Since I still just cannot match the original actionsheet 100%, I just filed a request for this feature :)

 

http://feedback.coronalabs.com/forums/188732-corona-feature-requests-feedback/suggestions/34945864-add-native-actionsheet-as-in-native-showalert




[topic_controls]
[/topic_controls]