Worklight tabbar - ios

I am working on Worklight version 6.1.I have created a Worklight project, added a Hybrid app and then added the iPhone environment to that application.I have generated Xcode environment and have added controller classes to that Xcode project.I have to add worklight Tab bar in my application.I am having html (web) page as the first page and from there I am navigating to view controller page.Added below function in main.js.
var tb = WL.TabBar;
tb.init();
tb.addItem("One", function () {
} ,"First", { image : ""});
tb.setVisible(true);
tb.setSelectedItem("One");
I am able to get the Tab bar items in web page.But Tab bar is not showing in any of the view controller screen.What I should do to have Worklight Tab Bar both in web and Native ios Screen.Help me to solve this.

Worklight uses Cordova, so when you launch your application what you see is the generated Cordova Web View by Worklight.
When you navigate to a native page (in your case, a new Class), you are essentially moving away from the Web View and into another View Controller, so you will not see the WL.TabBar instance in that View Controller (the tabbar belongs to the other one).
The following blog post contains background information on the architecture of a Worklight app and explains how to combine native controllers, such as a tabbar, in Cordova-based apps. Read it thoroughly and implement accordingly:
Combining native and web controls in Cordova based applications

For Web, use the Worklight Tab bar control -- as you have already done it.
For Native, you have to design a tab in the native code.
As suggested by #Idan, afterwards you have to establish communication/interaction between.
Read more: Combining native and web controls in Cordova based applications

If you are using worklight ,you can integrate both native and web codes,but it is bit tricky,and difficult to handle all the controls from native to web pages,and loading different pages onclick of tabs.
It is better to implement custom web tab bar look like native tab bar.
You can design custom tab bar in web more similar to native.

Related

React native base tab styling

I am working an react native application. I am using native base tab for tab navigation. It's working perfectly but this tab is plane and simple. I want this tab styling like google chrome tab. So how can style native base tab like chrome tab?? help please ...
One way is to use the Native Base Customizer tool and download the theme: https://nativebase.io/customizer/
Read the section Customize of documentation for more informations and others ways : https://docs.nativebase.io/Customize.html#Customize
use this in native base tab and styling on and text
<Tab heading={<TabHeading><Image ..../><Text>Text</Text></TabHeading>}

iPhone/iPad Status bar overlapping on app's header

I am using worklight 6.2 Consumer Edition on WAS Liberty Profile 8.5.5.1 Server. I am using jQuery Mobile 1.4.2 to develop UI. When I install app on iPhone/iPad, status bar of phone is hiding some part of my app's header.
How can I fix this issue (if its an issue)?
This works fine in a default new app with jQuery Mobile that was generated by Worklight Studio. As you can see, the status does not overlap the text.
You can also take a look at the Worklight Starter with jQuery Mobile edition, that also works on iOS w/out the status bar covering the top of app. Compare your CSS.
You need to provide a screen shot of what you're seeing, as well as provide a sample application where you are experiencing it. This issue originates from your code. Provide code.
One possible solution would be to add some margin-top to whichever element is at the top of your applicaiton's HTML.

How can I modify the browser control for phonegap in iOS to have menu buttons?

I have a PhoneGap application in iOS to display a web app. I want to modify the browser control that is displaying the web app to have a few buttons at the bottom that function as "back" "forward" "refresh" etc. is this possible? Do I need to use a plugin?
I suggest using html to implement those buttons, which is pretty easy with javascript. Since it's not performance-critical, doing this with native code is unnecessary.
I don't know any plugins for what exactly you want, but I have used the android version of this iOS ChildBrowser plugin which provides a pop-up browser with "back", "forward" and "refresh" buttons. It's quite convenient for browsing external web pages.

How do you create a raised tab bar item, like the one found in Instagram, with Titanium?

I am trying to create a menu like the one on Instragram, with the central item using a special design, but the Titanium Documentation does not provide information about this kind of feature
There's an example with an already answered question in here: How do you create a raised tab bar item, like is found in Instagram? but I need it working on titanium, any clues?
You can mimic that by following these steps;
(This is hackish but the only way for now)
Create the tab group
var tabGroup = Titanium.UI.createTabGroup({
id:"bottomTabs",
bottom:-50
});
Add tabs as much as you need
var tabTimeline = Titanium.UI.createTab({
icon:"icons/btn_timeline#2x.png",
title:"Timeline",
});
Create a button without a title to mimic the raised tab bar like in Instagram.
var btnScan = Titanium.UI.createButton({
backgroundImage:'icons/btn_action.png',
width:46,
height:46,
title:'',
bottom:0
});
Add that button to the tab group.
tabGroup.add(btnScan);
(hope someday titanium supports more low level APIs as well)
I believe Instagram is written in Objective-C. Creating a custom tab bar as they have made involves subclassing the native tab bar, but you don't have the ability to do that with just JS and Titanium.
Here's a tutorial for faking a custom tab bar in Titanium, which involves creating a window with buttons that controls the real tab bar.
http://www.samjordan.co.uk/2011/02/tutorial-custom-iphone-tabbar-using-appcelerator-titanium/
I don't know for which platform Instragram is developed in Titanium but I know about this type of tabs. I have created similar type of tab for one of my project so i can say that this is not built in tab you have to create it at your own.
you have to design icons, backgrounds, raised background and write logic to get this work same as Tab using available UI widgets like views, imageview and labe.
Hope you will be able write logic for this. According to my knowledge this is not built in tab, it's a custom tab.

How to create tabs in a ipad app that is similar a web browser tabs

I have a requirement to create a ipad app that supports tab to view content. I have created a custom splitview controller, whenever user goes to a particular section in the left section, the contents related to that will be displayed in the content view(right view). If a user selects a particular link in that content view it should open a tab and display the contents of that link in that new view. Similar to Web Browser tabs i need to handle tabs in this app. Please suggest any available open source component or any ideas to implement tabbing inside a ipad app.
You can use Three20 for your tab purpose. Also there are many open Source components available. You just need to search in google.

Resources