Add custom button in install4j - install4j

Is it possible to add a custom button (say, a retry one) on a configurable form, but have it placed on the bottom controls, next to the next and back buttons?

As of 6.x, it is not possible to customize the navigation bar or an arbitrary screen with the buttons at the bottom of the installer window.
If you write your own custom screen with the API, you can override hasDefaultButtons() and provide navigation controls yourself. To move to the next and previous screen, you would call context.getWizardContext().pressNextButton() or context.getWizardContext().pressNextButton(). To cancel, call context.getWizardContext()().pressCancelButton()

Related

Programmatically hiding a view controller from a tab bar application

I am working on a tab bar application. Is there a way I can programmatically hide one view controller from the scroll down list and from the "edit" list (but still be able to pop it on screen with a certain action, i.e. by calling its tabbarcontroller index)?
The problem is that I have now so many viewcontrollers that completely fill the "edit" screen. So I want to hide some of them and be able to trigger the hidden ones trough some action performed on one of the visible ones.
Thanks

Customized Vertical Tab bars in iphone

I am new to iphone development. Can anyone tell me how to implement a vertical tab bar? I want something that looks like the tab bar on the right side of the screenshot in this link http://michelangelo.com/2011/11/nps-national-mall/ with the overview, events and other options displayed in the image. Thanks!
A tabbar is nothing more then a bunch of buttons next to eachother where one (or none) button has a 'selected' state. To create a vertical tab-bar: Simply place a few buttons below each other and attach corresponding listeners from those buttons to your viewcontroller (delegate).
Everytime you press one of these buttons all the buttons go into the 'default' state and the button you pressed changes to 'selected' state. After that you can load a new view with (for instance) a UINavigationController

How to handle sub-content in tabGroups in Titanium Mobile

What is the designated way to handle alternating content in the active tab of a tabGroup?
In my case I have a tableview with a toolbar on top, and when a row is clicked, I'd like to switch the content in that tab to a new content with a different (edit) toolbar.
In the KitchenSink demo app the window is just replaced as far as I can see. Is this the way to go? How are transitions handled?
Thank you for your answers,
Chris
You can open the new window on the current tab:
tab.open(newWindow);
This will use the standard iOS navigation transition animation.
Also, you can configure a window's navigation bar (top bar) without needing to create and add a toolbar using Window properties like title, leftNavButton, rightNavButton. For example, create an edit button and then do:
newWindow.rightNavButton = editButton;
Also, you can create a standard edit button by setting the systemButton property to Ti.UI.iPhone.SystemButton.EDIT.
Finally, to create a system button with any title, set title property and also set the style property to Ti.UI.iPhone.SystemButtonStyle.BORDERED.

Add an animated top bar to UIWebView

I have a UIWebView controller that loads a web page and I would like to add some kind of a bar at the top of the page with refresh and close buttons.
The bar should hide when the page loaded and should show again if the user taps the top part of the page.
Does anyone know how to approach it? Is there any simple way to do that?
UPDATE:
I think I wasn't clear enough with the question, so here are some clarifications:
1. The applications is a standard application that one of the flows opens UIWebView that loads a web page
2. What I'm looking for is a bar that will slide down on top of the web page (loaded in UIWebView) and should help the user overcome a scenario where the web page is not loaded for some reason
3. The bar should hold the back (just close the UIWebView) and refresh (reload UIWebView) operations.
Hope it helped.
Thanks,
Shimix
I'm working on something like this right now and so far, here's what I've come up with. Some of this may be obvious, but important:
Your address bar should be the left navigationItem.
The search bar is the rign navigationItem.
You should animate a cancel button in/out when beginning/ending editing in the URL box.
Safari Mobile uses the Prompt property of the navigationBar to display webpage titles.
To animate the widths of the search/URL bars, use UIView animation when the bar is selected.
It's pretty simple to add a UIToolbar above the webview with UIBarButtonItems that call the webview's refresh, back, and forward methods. You can also add the webviewdelegate methods to your view controller to detect when the page has finished loading and hide/show the toolbar that way.
If you want the refresh and navigation controls to be displayed as part of the html content of the webview itself, that's a littler tricker, but not impossible. You can use the webview's shouldLoadRequest delegate method to detect that those buttons have been tapped, and then take the appropriate action within your viewcontroller. Hiding and showing the nav bar would have to be handled in javascript.
Unless I'm missing a library/project doing this, I don't think there is a simple way to do this.
I have already coded something similar to Safari mobile address bar, and from memory, it involved using private apis and/or playing with the "not so private but use at your own risks" UIWebView subviews hierarchy...

iphone persistent button on all views

I have a navigation app that has many screens the user navigates to. A handful of views manages these screens dynamically. What I want to try to do is add a button that will always show up on every screen the user views. I need to do this so that the user is always able to preform the action associated with the button regardless of where they are in the app.
Is it possible to achieve this by adding this button only once and having it passed between views like my navigation bar is? Or do I just have to man up and add this button and its functionality to every single view file I have?
Thanks
I would say it probably depends on what the button does. If the button is generic to all views, meaning it affects all views the same exact way so no customization for a given view is needed, then a way to do this would be to include the function in the App Delegate or as a subclass to your Navigation controller.
You can then use the rightBarButtonItem to always show the same button and just access that method. You would just have to add code for the rightBarButtonItem in each viewDidLoad (but they'd all be the same).
I did something similar to this with an "Upgrade" button on one project. Since all the button does is launch the AppStore to the paid version, it's independent of all views and I can place it anywhere.
You can put the button on the navigation bar if you want. Alternately, the more generic way to do this would be to split your single view into two views. One is small and only contains your button but always stays on the screen. The second is your workspace and you swap in and out the views that are displaying the current content. You'll note that this is the way the navigation controls and tab-bar controls work.
The last way to do this would be to put different buttons, in the same place, on each view and have them all trigger the same action. As far as the user is concerned this looks like the same button. Disadvantage here is that you can't alter the button across all views in a simple manner.