UINavigationBar for JQuery Mobile, or other HTML solution - ios

I am building a PhoneGap app that uses JQuery Mobile, and I would like the app to feel as much like a native app as possible. What out there emulates the look and feel of a native UINavigationController best in Safari-land?
I'd much prefer to write all the silly user interface code in HTML/Javascript, rather than using verbose Objective C code.

A lot of the other JavaScript mobile frameworks (Sencha Touch, jQTouch, ChocolateChip-UI, AppML, etc) have built-in navigation emulating the UINavigationController in HTML/JavaScript/CSS.
jQuery Mobile does too, but it seems less like it is trying to look exactly like a UINavigationController.
eg: http://jquerymobile.com/demos/1.0a4.1/#docs/pages/index.html
In the above demo you can see that there is a top menu bar with back buttons as you navigate through the demo.
However, if you want it to emulate the native UINavigationController more closely, you might be better off looking at one of the other frameworks I mentioned above.

Related

Replicate iOS Pattern: Instagram Search-Style Swiping Tabs

I'm starting a new iOS project in Swift, and my experience programming native iOS applications is minimal, so please bear with me if I use some whacky terminology or overlook some simple solutions.
I'm looking to replicate a pattern in the Instagram application, as seen here:
Selected Tab
Swiping Transition
For those who don't use Instagram, what's essentially going on here is something like a UIPageViewController (with swiping functionality), but with the tabs on top indicating the selected page.
Like in Instagram, I'm planning to have this functionality within a child UIViewController of a UITabBarController (you can see the "main" tabs on the bottom).
What I started out doing was creating static tabs and adding left and right gesture recognizers to the child UIViewController, which would change the page and update the indicator of the selected page on the tabs.
This works but I'm not really loving the way it looks, nor the way it's written. I don't like the idea of needing 2 instances of the tabs, and that certainly doesn't seem to be the way Instagram is doing it, because as shown in the second image, the indicator slides between the tabs.
I've searched a fair bit, but all references to replicating Instagram patterns seem to be outdated and don't address this specific element. Like I said, though, I haven't been programming native iOS for very long (I'm an Android developer and have used Xamarin for iOS), so it's possible I'm just not using the right keywords.
I'd appreciate any help y'all can offer!
Thanks

Multiple webview in an app or one

I'm creating an ios/android app that is implemented with partially native code and html5/css and built-in mobile webkit, I need to make it support both ios and Android, hence the html5/css selection. In my app I created a tabbar with 4 tab buttons, each tabview contains a webview, the tabs and tabbars are implemented natively, meaning the code for this is either objective-c or Java. What happens in those webviews are html5/css/js... I wonder if this is the appropriate way to implement it, or should I wrap the whole thing up in one single webview, and implement everything using html5, including the tabbar. Or let me ask this way, what did facebook do with its tabbars in its app? I'm concerning about user experience and seamless transition/animation.
If I can mimic the native ios/Android tabbar using html5, how may I? Anyone could maybe provide a link to a tutorial? Thanks!

iOS Weather Like Navigation Component

I'm trying to find the control that enables the horizontal scrolling with little dot navigation like the weather app has in iOS.
I can't seem to find it, and I'm assuming it exists because I see the exact same implementation in a ton of apps.
Bonus points if you can link to a Xamarin or Objective-C example (Xamarin preferred).
This is the UIPageViewController component, which is documented here:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html
...and a thorough example follows below:
http://www.techotopia.com/index.php/An_Example_iOS_7_UIPageViewController_Application
Hope this provides the functionality you're looking for, but I'm pretty sure it's the same component.

IBM Worklight - Is it possible to add UINavigationController as the starting native page?

I am trying to integrate a navigation based iOS application into IBM worklight. However, I am not able to add UINavigationController as its first native page. In the tutorials, they have only explained integrating a normal UIViewController. Since UINavigationController is a subclass of UIViewController, Shouldn't one be able to integrate that as well?. Could some one please tell me if I can integrate a navigationcontroller using "WL.NativePage.show" API.
Currently, I am not able to figure out how to set the rootviewcontroller for the navigationcontroller object.
I do not know the motives for your request so this might not answer your question, but it does offer an alternative.
See the following blog post by Anton Aleksandrov. In it Anton explains how use native controls, which can also be navigation controls in your case, in your Worklight Hybrid application. That is, w/out the need to do it in a "native page".
Essentially, you are still using the HTML file as the "starting page" of the application, but you shrink the Cordova WebView, allowing you to add, place, native controls at the top and bottom for example. There you can place a native navigation control.
Blog post: [iOS] Combining native and web controls in Cordova based applications

How does one present a modal view using PhoneGap?

Having made a few iOS apps, I'm now taking my first steps in building a HTML5 app with PhoneGap.
One of the things that has stumped me is how to present a modal view. In iOS it's trivial:
[myViewController presentModalViewController:modalViewController animated:YES];
But after a bit of Googling, and checking out PhoneGap's API reference, I can't find a single example of how to present a modal view...something I thought would be a trivial task with 100s of tutorials.
Or maybe I'm just really bad at Googling! I think however, that I'm missing something blindingly obvious...
there is no presentModalViewController for phonegap, in phonegap you load all your code in a "webView", and all the code and page transitions have to be done with html+css+javascript, so you have to create your own flip, crossdisolve and other animations (or use jquery mobile, jqtouch, jqmobi or any other javascript framework with this animations), so you can reuse the code in other platforms, you don't have presentModalViewController on android or blackberry.
If you really want to use presentModalViewController on a iOS phonegap app, you have to create a plugin, or use phonegap as a component, then you create different views, loading different html files on them, and change betweem them with native code.
This will help you to
http://malsup.com/jquery/block/#dialog
I much rather use bootstrap (http://getbootstrap.com/javascript/)
$('#myModal').modal('show')

Resources