I want to put pop up button like Email in UIWebView.In my app i have created ebook
in webView now whenever i click(long press) on index page link it will create the pop up
window with open and copy button as shwon as below:
Like this i want to put another button like Email and Print.How to create another button in pop up window in WebView?Thanks in advance!
The popup you refer to is called a
UIMenuController
. You can access the[UIMenuController sharedMenuController]
method to get the menu controller. You can then add your ownUIMenuItems
to the menu controller.Now implement the methods
For more detail refer apple's Doc.
Edit
you can implement Long Gesture
you can create a View Controller, and in the view controller's .xib file you can add your buttons.
then you can call that viewcontroller in the UIPopover..and load that view controller in it.
Now as you want to show this popover in the index page only, for this you have to keep a track of pages like pages form 1-3 are of index page so the popOver should be seen on that page. and when you click on the index link you can use the webView delegate function i.e
under this function you can apply your logic and initiate the popover that will be seen