There does not seem to be a lot of information on the "Custom Map Field" features. I am adding Images to my custom MapField and would like to make those images clickable. If anyone is familiar with this please let me know and ill post my Code snippet , etc.
Thank you
There are two MapField classes in the API: the old net.rim.device.api.lbs.MapField, available since OS 4.5, and the newer net.rim.device.api.lbs.maps.ui.MapField, available from OS 6.0 onwards. For the newest one, the default action when an item is clicked is to show a dialog with info, but I think you could listen for clicks by setting a custom MapAction instance in the MapField. If not possible, then for both old and new mapfields you can override navigationClick and look for the nearest clickable item to the map center. This nearest neighbour lookup should be optimized in case you have a large number of clickable items (for instance, skipping all non visible elements). For touchscreen enabled devices, you can override touchEvent, retrieve the clicked position and do the same.
Actually both approaches are compatible.
Related
I'd like to know if there is a way to best detect a users tap on a label?
The new iOS15 Maps app allows a tap on e.g. a cities name and then shows informations about that city.
I am now wondering if something similar can be done with mapbox?
I know that there is a mapView.visibleFeatures(in: myRect) function that can somehow help here. So I can convert my finger location to a rect and then get all features there.
BUT... my city e.g. might have a label that is let's say 200 px wide. So I would need to have a quite large rect to find the point of my city label. And then I will also get all kinds of other labels that might be there. Maybe even not visible, but in the dataset.
Is there no way to ask the map what the frontmost element was when I tapped? So that when I tap on the far end of the label, I still get that ONE feature?
I am still using Mapbox V6.3... the latest before their last major update.
But if it's not possible with that version, an answer about the latest V10.something would also be great.
For v10, this example demonstrates how to identify features near a click. While the overall example is to a different end, the onMapClick functions shows the method to find a feature and then build an annotation.
https://docs.mapbox.com/ios/maps/examples/view-annotation-marker/
In every ios app you can have a list that contains elements with subelements.
Tapping on the element will open a new page and you can usually press back to return.
This is indicated with a grey ">" symbol on the right.
Is this symbol downloadable somewhere? I know i can just type a > but it doesn't look exactly like the default icon used by ios.
I'm using Xamarin dialog and a standard RootElement embedded as a list item looks exactly like the default ios but i need to customize it with an icon placed left of the text(which is no problem except that i now lose the default > icon).
Googling for ios system icons, ios default icons and ios sdk did not yield the wanted result. I'm hoping that these icons are somewhere embedded on the device.
I hope you guys can help me out, thanks !
As far as I know there is no way to access a UIImage instance of the chevron during run time. Most likely there is private API for this, but I am not aware of it, and since it's private you are not allowed to use it anyway.
You could probably instantiate a cell that has the disclosure indicator as accessoryType and walk the view hierarchy to find it. But that will break easily, so don't do it.
The best way is to add an image and update it with every new iOS release.
There's the iOS Artwork Extractor which basically gets you every piece of artwork that is used in iOS.
The artwork you are looking for should be named UITableNext. (at least that's the name in iOS6, I don't have an extracted archive of iOS7 yet)
Strictly speaking you are violating Apples rules and their copyright if you use their artwork without Apples written consent.
As far as I know this has never been enforced, and lots of people do it, but it's good to keep it in mind.
How do I create a tab bar like WhatsApp on BlackBerry in my BlackBerry app? I want that feature in BlackBerry OS 7.0. I have used managers -- HorizontalFieldManager and VerticalFieldManager -- to achieve it. But it doesn't look as attractive as WhatsApp. Can FieldTabController help me do this?
It's not going to look attractive if you are just making tweaks to the code, and then seeing what that looks like. You need to start with a design you find attractive. Once you have that goal put together as an image, you start writing code to make the UI look like the design image.
The WhatsApp tab bar is not a straightforward combination of built-in UI managers from RIM. It has a fair amount of customization - each tab has three visual states, and there is a tooltip that follows the focus, as well as a context tab on the right that changes depending on the currently selected main tab. This means there are several interacting UI components here, not just a single magic manager.
Essentially, you will probably want to start building your own custom Field objects.
Basically, subclass the Field class (or one of the other subclasses), and learn to love the paint(..) method and the Graphics API.
For my next iOS app, I'd like to include a button to access an info screen - the typical use case for the infoButton. However I'd like to have it displayed larger than its stock size. Is there a way to do that using standard iOS icons or do I have to roll my own?
(Please note that I'm not interested in increasing the tap area, the "i" should also be larger.)
You can easily just find some art that is a bigger 'i' and use it as a custom button but I don't think you can adjust the button from Apple.
I'm trying to figure out if this sort of thing is possible in iOS.
I'd like to have a UI where the user can drag "bubbles", each representing a noun, from a source pool into a destination panel. In addition, I'd like to be able to have another word pool of bubbles, each with adjective bubbles. These adjective bubbles could be dragged over noun bubbles already in the destination panel in order to modify them, making a combined bubble.
Mock-up of what I'm envisioning:
Is this possible in iOS (any versions)? Preferably using stock controls, but any way is fine. I will admit I have never worked with Objective-C or iOS dev before, but I am aiming for this sort of interface for my app, and want to see if it's at all possible.
Yes, this is certainly possible - but not something you could use 'stock' controls for. I would recommend learning about UIGestureRecognizer classes, try this tutorial for starters:
UIGestureRecognizer Tutorial in iOS 5: Pinches, Pans, and More!