My tabbar have more than 6 items,when I click [more] item,it will show other items with a tableview.
Then click the one of items,I hide the navBar use setNavigationBarHidden:YES in viewDidLoad,and I have a custom button click to back [more] use popViewControllerAnimated:YES.
When it back,the navBar still hiding,how can I show the navBar recover on [more] screen?(I need the EDIT button in [more])
Just call setNavigationBarHidden:NO animated:YES, before calling popViewControllerAnimated:YES.
I added this to viewdidAppear on my custom tabbar controller class
not the proper way to to do it but I haven't had any problems with it
tabBarController!.moreNavigationController.isNavigationBarHidden = true
tabBarController!.tabBar.isHidden = true
Related
I can manage to remove an image
def remove_image
#button_image.removeFromSuperview
end
But what script works in order to remove a button?
A button is a subclass of a UIView so you can remove it the same way:
#button.removeFromSuperview
Alternatively, you can just hide the button:
#button.hidden = true
This is my very first question to the helpful group of stackoverflow.com
Please bear with me if question framing is cumbersome!!
I have a collectionView(in a ViewController),embedded in a NavigationViewController.
I have used didSelectItemAtIndexPath for each of the collectionView cells, linking them to different viewControllers,say VC1,VC2 etc
I have hidden the Navigation bar, in the ViewController containing the collectionView, using the code
self.navigationController?.navigationBar.hidden = true
In each of VC1,Vc2....., I have tried to unhide the navigationBar using the code,
self.navigationController?.navigationBar.hidden = False
During simulation, using xCode, the navigation bar appears only in VC1, but not in VC2,VC3....
From the details you provided it is hard to guess what is exactly the issue.
The navigation controller will remember its status, as long as you use push segues, it should stay hidden, unless you set it to show again. You can set it to be hidden before you perform the transition, say in didSelectItemAtIndexPath.
To hide the navigation controller, you can use:
navigationController?.setNavigationBarHidden(true, animated: true)
and to show it
navigationController?.setNavigationBarHidden(false, animated: true)
I want the disclosure button to be visible on each of the items of the list only when i click an "EDIT" button. How can i do that?? I tried "list.setOnItemDisclosure(true);" on clicking the EDIT button but disclosure didn't appear.
Just create a css class where the x-item-disclosure would be hidden :
.hidden-disclosure-list .x-list-disclosure {
display: none;
}
Then when you want to hide them you just have to do:
list.addCls('hidden-disclosure-list');
And when you want to display them just do:
list.removeCls('hidden-disclosure-list');
Hope this helps
Manipulate the list's on item disclosure property...On click of the edit button toggle the list's onItemDisclosure property...
list.setOnItemDisclosure(true);
I put on bevel button in toolbar, set image for this button and uncheck checkbox bordered. How make pushed icon in toolbar like this?
You need to mark your toolbar item as Selectable. Edit your nib file in Xcode, double click the toolbar, click the item in Allowed Toolbar items and, in the Utilities panel, show the Attributes inspector and mark the Selectable checkbox.
Return your item identifiers in the delegate of the toolbar:
- (NSArray*)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
{
return _toolbarIdentifiers;
}
The toolbar will consider them selectable, so the selected item will be displayed the way you need.
There is a button at bottom right of iPad keyboard which is to hide the keypad.
How can I interact with it programmatically? (get the button then send UIControlEventTouchUpInside to it).
Does anyone know this?
[Edit]
In my case, the keyboard is shown on a modal view.
Overriding disablesAutomaticKeyboardDismissal to return NO as below allows you to dismiss the keyboard when you resignFirstResponder, even when your UITextView is on a modal view. You should put this code to your view controller, from which you initiate the keyboard:
- (BOOL)disablesAutomaticKeyboardDismissal {
return NO;
}
Source: https://stackoverflow.com/a/6268520
In general, you would send the resignFirsResponder message to the active input view.
Something like this? I can't remember where I found this code but I used it to toggle the on-screen keyboard because it would be hidden by default if a bluetooth one was connected.
- (void) toggleKeyboard(UIKeyboardImpl * keyImpl){
if (UIKeyboardAutomaticIsOnScreen()) {
UIKeyboardOrderOutAutomatic();
} else {
UIKeyboardOrderInAutomatic();
}
Edit
I found where I got this code from. It works fine but the catch is that you need to import the private framework GraphicsServices, which would most likely get your app rejected from the App store.