How to add an option to the popup actionsheet of iphone safari? - iphone

I am using UIWebview in my app, when tap and hold on a link for a second an actionsheet pops up with some options OPEN, COPY and Cancel.
How to add a custom option to the actionsheet ?

No you can't.
The buttons in the popup action sheet are hardcoded for each data type. You can't change that from a web site. You can change the buttons by overriding various private methods in UIWebDocumentView and UIWebURLAction, but you can't do these in AppStore apps anyway since they are undocumented classes.

Related

UITabBar button without a UIViewController

Was wondering if any of you tried to add a UITabBarItem to UITabBar that functions as a button that opens safari Externally. Meaning it would not be a real tab, but just used as a button.
Does Apple reject apps for using the UITabBarItem like so?
Thanks in advance.
Try setting a view controller for that tab and then in the viewDidLoad viewDidAppear method add in your URL Scheme to load up safari or whatever app you need to open.
I see no reason why Apple would reject it. All the tab bar really is, is just a UI preference.
Apple does not reject tabBar button that opens Safari externally.

iphone - Back button in an app without view controller

I'm completely new to iphone apps. I'm creating an iphone app that is designed in HTML and jquery with phonegap. I want to include a back button on the top like the default one in the iphone. I searched on net but all i found, required view controllers.I don't have multiple views so how can i include a back button on my app. Step by step explanation would be very helpful.
Thanks in advance..:)
Why would you include a "back" button if you don't have multiple views? What exactly will you navigate "back" to?
"The net" is correct, you need a UINavigationController to house a "back" button which would pop a view to the previous view.
Other than a UINavigationController, you could use a UIToolbar and set a button to the left hand corner and give it the title of "Back" to simulate the native appearance — but this would be misleading and pointless.
I don't use PhoneGap, but I am sure there is a way to simulate a NavigationController and manually place a button there. I'm also sure it won't be shaped like a back button either (with the pointy end).
javascript:history.go(-1)
UINavigationController is a native control which is in iOS frameworks. As you are using HTML, jQueryMobile and phonegap you should not be looking at those controls. You should totally work in your HTML pages and CSS for that purpose.
The below page contains that back button in jquery mobile. You should be implementing this in your html page.
http://jquerymobile.com/test/docs/toolbars/docs-headers.html

How to create a small popup in iOS?

I'm looking for the simplest code in order to implement a small popup (NOT a full screen modal popup or alert view). I just need it to display some basic text inside the popup, then exit it when I click away. The popup in the EleMints app is a good example.
UIPopoverController does this, but it's limited to iPad only. If you need this on iPhone, just implement a custom UIView subclass. Then when you want to show your popover, instantiate the subclass and add it to your view, maybe with some animation.
You can use WEPopOver as that is the one you required. For more info, visit this link
You can also use the following refrence link for UIPopOver controller
1) WEPopOver Library
2) Popup Bubbles

Tab Bar with popup buttons iPhone

I want to have this type of bar at the bottom of the application and whenever a button is clicked new buttons should popup, which one of them when clicked should take me to its connected view
You shouldn't use Popup as control, I'll recommend you to use it like a notification as this is not Apple way of showing controls.
Here is a nice link from boctor iDev recipes.
You can find here custom UITabBar as well Notification
I would suggest you not to try customizing UITabbar. This will go against the normal behavior of UITabbar and Apple may reject your app for tampering with normal behavior.
You can try having a UIView with a set of buttons in them and bring the similar functionality as in your image.

add new window or view on the alertview click button in iphone

i juzz want to know that how we can add new window or view on the click of an alertview button in iphone?
I'm not sure you can do that from an AlertView since alertviews are meant only to display a specific alert not to take an action. I guess you better off using an ActionViews which is recommended by Apple if you want to perform a certain action from a model view in iphone.
Regards,