in ol3, after executing
layer.setVisible(false);
selected Features are still visible. I wanne all features of a layer to be completely hidden after I set the layer to be invisible. How to solve the problem ?
Thanks,
First, clear the selection:
var select = new ol.interaction.Select();
var collection = select.getFeatures();
collection.clear();
or
select.getFeatures().clear();
Related
I used the new UIColorPickerViewController in iOS 14.
I would like to display to the user only the first tab of picker (Grid color part) without other tabs.
Is it possible ?
How to get this rendering?
Based on Apple documentation for UIColorPickerViewController it is not possible.
You could only set a selectedColor and supportsAlpha parameters.
I'm using tabbar with four tabs with title. I'm setting different color for selected and unselected tabs. But only for the first tab, the selected and unselected colors & title are getting overlapped. Whenever I'm selecting first tab, title is getting added again and again. I have attached screenshot as well.
In storyboard
Anyhelp could be appreciated. Thanks in advance.
You problem is most likely from the color you use for unselectedItemTintColor, which you have set to have transparency. This color should probably be solid. Try changing it to a solid version of what you want to see, like #EB989E.
Also be aware that you are setting an internal property, and as such it may change or disappear in a future release of iOS.
In TableViewCell, I have custom imageview which act as a radio button. This imageview has two states
Selected
Not Selected
By default I have given, Accessibility label as "Selected Checkbox" and "checkbox". Now I want to speak voice text as "new item selected" when it selects and "item deselected" when deselected.
Can we give all four different label? How can I get the same.
Updated: I tried using
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,#"text")
but it skips the text which need to speak.
I'm not entirely sure what you are attempting to do here but I'll try to provide an alternative way of making this accessible.
Instead of treating each radio button as either selected or deselected would it not be better to treat the entire group of radio buttons as one combined accessibility element.
So if you have radio buttons for [cat, dog, rabbit, guinea pig]. Then your accessibility should read something like...
Animal selection group: none selected
or
Animal selection group: rabbit selected
etc...
Having said all of that... what is this UI you are trying to create?
Radio buttons are fundamentally not a part of iOS. It would be a much better alternative to use UI that users know. And then by doing this you make your accessibility issue a non-issue.
Perhaps a UIPickerView or a UITableView might be better alternatives to radio buttons?
Not sure what are you exactly want to do.
My assumption: You want to generate sound on click of a button for tableviewcell and also changing the image of Imageview at the same time while checking the state of it (selected or non-selected).
***** do it inside your customTableViewCell class...
create IBOutlets in .h or .m for your 3 items from customtableviewcell xib.
create boolean flag to maintain current state (selected or non selected) of that cell.
create IBaction selector(method) to get event(touch up inside) of button click. Inside this method write code which checks following.
BOOL selectState; //Make this Global in classfile
if(selectState) // selected state YES
{
xyzImgView.image = //Your Non selection Image;
selectState = !selectState;
//Play your sound for Non selection
}
else // selected state NO
{
xyzImgView.image = //Your selection Image;
selectState = !selectState;
//Play your sound for selection
}
// Considering you have an IBOutlet to checkBoxButton
checkBoxButton.accessibilityLabel = checkBoxButton.isSelected ? "selected" : "not selected"
checkBoxButton.accessibilityHint = checkBoxButton.isSelected ? "" : "Tap to select"
I am new to iOS programming. I am working on an app that will ask user to choose his/her blood group from a drop down options menu. I want to build it programmatically. Can someone help me with that?
you can use this lib,Its very good and dev friendly and easily customised
DropDown
Its very simple to implement just in some lines of code ,Sample to use in Swift,Also check the sample in github
dropDown = DropDown()
// The view to which the drop down will appear on
dropDown.anchorView = inputToolbar // your textfield
dropDown.direction = .Top
dropDown.dataSource = [String] //your datasource
Does anyone know how you can configure the visibility of a TeeChart Series programmatically in C++? I can't seem to find the right proprety using the auto completion.
I basically want to set Series1 visible at certain times and Series2 invisible, and the other way round following different conditions.
What I basically want is something to this effect :
Series1->Visible = false;
Series2->Visible = true;
except that this doesn't work.
If anyone could help, that would be greatly appreciated.
Chris
Found the answer to my own question. The property is "Active" - don't know why I didn't think of it before.
C++ :
Series1->Active = False;
Series2->Active = True;
EDIT : Beware, even if you change the title of your series, the "real" name to use in this code will probably still be Series1/2/... . This is because every Series you create (by right clicking on the TDBChart->Chart->Series->Add) creates a TBarSerie which seemingly can only be accessed from the Object inspector. The title you give it doesn't affect its real name.
Thanks for your comment, Narcis Calvet.