UITabBar button without a UIViewController - iphone

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.

Related

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

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.

Change current screen in TabBar Application on IOS app

I've created a tabbar application using the template in Xcode, and have setup a working tab bar application. I want to know how I can change the view currently on the screen using a UIButton, so the result is the same as if the user just clicked one of the tabs.
this is question was also asked by me and got good answer
look at
Click a tab of tabbarController programmatically
hope it will help....

Adding a navigation bar to a web view in a tab bar app

I've built the tab bar application in IB, with three tabs. The third tab happily displays a UIWebview where you can browse. The only thing missing is a back button, as not all web pages supply such a link.
I need a navigation bar hooked up properly to the correct classes. I'm still a bit unsure about exactly how the hierarchy should look in interface builder and how to hook it up properly.
Currently, the third tab is hooked up to a referencing outlet called 'webnews' in the class 'thirdviewcontroller', and the UIWebView (under a normal IUView in the hierarchy, which in turn is under the third tab bar controller) is connected to the webnews outlet.
How do I make the navbar control the webview, and do I add code to the thirdviewcontroller.m that lets the navbar on the view control the webview 'back' function? What do I hook up as the delegate for it? Currently I have an app delegate, but that's hooked up to the tab bar.
I'm not really after specific code as much as a general 'how it works' clue :) (Unless I can just add the navbar dynamically to the functioning app... but I don't think addSubView on viewWillAppear {} in thirdviewcontroller.m will create the proper functionality?)
If I were to guess at the simplest solution, I'd guess create a navbarcontroller.h/.m, slap a navbar on the view in IB, connect the third tab to navbarcontroller, connect the navbar to the webview (?) and move the webnews outlet to navbarcontroller.h, and connect the webview to it. But I don't quite have the nerve to try, better to ask advice first.
Answering this, see similar Detect and handle, or override, clicks on a navigation bar

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

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.