Rubymotion implementation of the previous/next buttons in the webview - objective-c

I'm new to iOS development and recently started out with rubymotion.
Im currently working on a "start page" kind of application that loads an in app html/css/js file in a webview. The "start page" then links to different sections/pages on (a to be released) responsive design version of http://hiof.no .
My current build of the app is based on the PaintHTML example:
https://github.com/HipByte/RubyMotionSamples/tree/master/PaintHTML
The feature I'm stuck on at the moment is previous/next page navigation to navigate back and forth in the webview history.
The idea of the navigation feature is to have previous/forward buttons positioned fixed on the bottom left side of the app similar to the Path app "new content" button.
Any ideas how I can implement access to the webview history with "native" rubymotion code?

the UIWebView have to methods UIWebView#goBack and UIWebView#goForward,
create two button and set the action to #webView.goBack and #webView.goForward; and you can enable the button with the methods [UIWebView#canGoForward and UIWebView#canGoBack]
Documentation

Related

React native responsive side menu

I am using the library react-navigation-drawer for my app side menu.
My app should be working on iphone and iPad as well.
The default side menu of this library is working well on iPhone.
But on iPad, side menu should be always visible on my app.
I could implement this by drawerLockMode:'locked-open' on some pages.
But Side menu has been overlayed on content screen. and could not doing any actions on content screen.
Even content screen has been pushed aside as width of side menu.
Anyone help me how to implement the responsive side menu on iPhone and iPad?
Thanks
whenever app is running on iPad, set drawerType={'permanent'} for Drawer.Navigator
https://reactnavigation.org/docs/drawer-navigator/#drawertype

I have a project with a web browser inside. How do I make a back button in the navigation bar for the browser?

I need the back button to make the browser go back, instead of navigate through the different app views.
I assume the "web browser" is a UIWebView? If so, the -goBack method will go back to the prior web page.
You shouldn't use the navigation bar to do this, as the navigation bar is primarily intended for navigating the views/screens of the app. Instead, create a toolbar, put a "back button" in the toolbar (perhaps a left-pointing arrow image, as that's fairly common for web browser "back"), and hook this button to the -goBack method.
You may not be able to hook the -goBack method directly to your button, as it's strictly not an IBAction. But that's easy enough to work around:
- (IBAction)doGoBack:(id)sender {
[self.webview goBack];
}

Titanium: Android back navigation via app icon in upper left corner

I have just started exploring Titanium.
I am looking for components/help to accomplish the standard Android sub-window back-navigation, where you have the app icon and back functionality in the upper left corner.
I checked the tutorials/SDK and kitchen sink project but don't seem to be able to find anything similar.
On their page with sample customer apps seems to be at least one app that demonstrates this type of navigation, which makes me think it should be available.
Any help or pointers would be much appreciated.
In our Android/iOS application, we use the standard iOS navigation, but on the Android side we built our own custom header view to implement our navigation. This view is added to the top of all other windows and/or main views.
We hooked the android:back button to trigger the navigation view's back feature as well, so we support both "standards".

Looking for a drop down navigation menu

I am trying to make a drop down navigation menu for an iPhone client to my website. The menu type that I am searching for is the one used in Facebook's iPhone client. It is found in the upper left-hand corner of Facebook's application after you sign in. Is anyone familiar with this?
Here is a link to an open source controller that implements a slide out like the facebook app.
http://ipup.github.com/PPRevealSideViewController
slide out menu
There are a few other examples around in the community, but I've had luck with this one and hopefully you will too.
be well!

how to come back to different view after opening the safari through another view in iphone application?

I'm using tabbar based application. I have 9 tabbar items. I'm calling the safari in my 6th tabbar item. When i close the safari and open the app again i want my app to open the 2nd tab in the application. Can any one help me out in this issue.
Thanks
Try programmatically set tab bar selected index to 2 applicationDidBecomeActive/applicationDidFinishLaunching(if your app does not run in background). You can search on google and you will easily find the answer.