When parent window creates a child window, the child window is always on top of the parent window. Clicking one of the sibling windows generated by the same parent window, will make the clicked one on top. But clicking the parent window won't let it show on the top of other child windows. How can I make it work?
Assuming "win" is the name of your child window - this is added in your main.js or index.js file if you want the window to be focused.
win.on('show', () => { win.focus(); });
win.show();
Related
I have a container view, and in the window it created I added a button. The button is visible, but when I click it there's no clicking animation.
Furthermore, I created an action using it, but it doesn't call it at all.
Here are some screen shots.
check if you perform any long task in main thread
check if the container view and the button userInteraction property is true and Enabled is true
select the viewcontroller from storyboard and make sure custom class ProductsView is assigned to it
KYDrawerController
link - https://github.com/ykyouhei/KYDrawerController
Hello Guys,
It's lib and integrate slide menu, but here I am not able to update the main view from slide menu view(or drawer view) the view is always updated on Menu view only.
For example, I have four views as follows:-
1- main
2- drawer (slide menu)
2.1 - in the drawer, there is two button menu ie signup and login
From the main menu I am able to access the drawer menu but when I used to click the menu button the view is updating on drawer menu only and the main view is as it is
any suggestion..!
Thank you
Please try to using NSNotificationCenter
In the main view, add observer to some notification, and then in button's event handler to post that notification.
I am trying to make the slide menu re-useable without having to constantly add the same menu to every viewController in the menu drawer. How can I re-use, can I wrap all my view controllers within some type of main controller?
You could create a new root view controller which contains the slide menu and also contains a container view that covers the entire size of the screen.
Within the container view you would embed your old root view controller.
The slide menu is now available to every view controller in your application and you can make it appear or disappear when you want by animating its frame origin to slide onto and off of the screen.
You could use AMSlideOutNavigation
https://github.com/andreamazz/SlideOutNavigation
For an iPad Application developed using Appcelerator Titanium SDK 3.1.2, I have a Ti.UI.Tab Group which contains 5 Ti.UI.Tabs. Each Tab contains a Root Ti.UI.Window and certain tabs open additional windows when relevant.
When you double tap any of the Tabs in the Tab Group, the Tab double tapped will reset its content to the Root Window, automatically closing windows inside it that were open.
I want to disable this from happening, but there is no property for either the Tab Group or the Tab itself that allows me to prevent the double tap from occurring.
An alternative to creating your own TabGroup Control using Views, is to add a NavigationGroup Control inside the Tab where you want to prevent resetting of Windows when a double tap occurs on the Tab.
In your Tab Control for your TabGroup, create an empty Window Control and link it to your Tab as you would normally do. Then, create a NavigationGroup Control and add it to the Tab's root Window:
//Set up your Tab Group with a Tab and a Root Window for the Tab
var tabGroup = Ti.UI.createTabGroup();
var tabWin = Ti.UI.createWindow({
navBarHidden:true
});
var tab = Ti.UI.createTab({
window:tabWin
});
tabGroup.addTab(tab);
//Create a Root Window Control for the Navigation Group
var navWin = Ti.UI.createWindow({
title:'NavGroup Root Window'
});
//Create a NavigationGroup Control and add it to the Root Window
var nav = Ti.UI.iPhone.createNavigationGroup({
window: navWin
});
tabWin.add(nav);
//Launch Tab Group
tabGroup.open();
When you open Windows inside this tab, instead of using the Tab.open(Window) method, use the NavigationGroup.open(Window). Let the NavigationGroup manage the Window Stack instead of the Tab:
//Open a new Window inside the Navigation Group
var win1 = Ti.UI.createWindow();
nav.open(win1);
//Close this Window you opened
nav.close(win1);
By doing this, you prevent the Window Stack from resetting when users double tab the relevant Tab that contains the NavigationGroup Object.
I encountered a similar problem before.
End up I compose my own tab bar to do the tab switching. So that whenever a tab button is clicked, I can get the tab event and do the checking.
Hope it helps.
I have a list of items showed on a page. Each item can be clicked and opened in a popup window to be edited. On this popup window, I have a save button.
When this 'save' button is clicked, I would like:
call an action controller to update the database
close the popup window
refresh the main list item (still opened in the background)
Can anyone help me to achieve this? I really don't know how to update the main window (list of items).
Thanks.