-5

When pressing + button on the the center bottom of Instagram using mobile browser, it invokes a non-HTML menu like the illustration below:

enter image description here

Does anyone know how to invoke this? My guess is that this is mobile user-agent specific feature but I need an affirmative answer, as well as how it is named.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
高科技黑手
  • 1,252
  • 2
  • 12
  • 20
  • FWIW, I don’t think this question is too broad. It’s very specific. It’s just one of those rare cases where it’s hard to articulate the question because the OP is asking how to achieve some very specific UI. But it’s hard to imagine how this question could be more clear. – Rob Jan 26 '19 at 17:46

2 Answers2

1

You generate this with a HTML <form> that contains an input field of type file:

<input type="file" accept="image/*">

The mobile web browser will render that as an action sheet. E.g. in iOS:

web browser

A desktop web browser will render that as a file dialog box (again, not a web based form, but a native OS dialog box).


Obviously, feel free to customize the upload button appearance however you want, e.g. https://stackoverflow.com/a/6461518/1271826.

Rob
  • 415,655
  • 72
  • 787
  • 1,044
0

This is UIAlertController for native iOS. find code below for reference.

@IBAction func showActionSheet(_ sender: Any) {

        let alertController = UIAlertController(title: "Title", message: "Delete option exists", preferredStyle: .actionSheet)


        let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: { (alert: UIAlertAction!) -> Void in
            print("Cancel")
        })

        let noAction = UIAlertAction(title: "No", style: .default, handler: { (alert: UIAlertAction!) -> Void in
            print("No")
        })

        let maybeAction = UIAlertAction(title: "Maybe", style: .default, handler: { (alert: UIAlertAction!) -> Void in
            print("Maybe")
        })


        alertController.addAction(cancelAction)
        alertController.addAction(noAction)
        alertController.addAction(maybeAction)

        self.present(alertController, animated: true, completion: nil)


    }

for native android go for BottomSheetDialog And if you want to achieve this functionality in iOS safari browser for your website, then simple file input type will render this.

Ajay saini
  • 2,352
  • 1
  • 11
  • 25