I have multiple markers in my google map. Each containing different information. When the user click on the marker a small view appears containing all the information. I have put up a swipe gesture on the view. What i want to achieve is that when user swipes from left to right the next marker appears in the center of the map.
**
I just need to know some logic or example. what should i implement on
swipe handler that changes the marker.
**
Gracias
Note that the swipe from left to right gesture might interfere (both programmatically as from a user's point of view) with the normal behaviour of this gesture on a map - scrolling it.
That said, you'll have to keep an NS(Mutable)Array of markers somewhere (there is no property on GMSMapView which gives you all markers). Upon detecting the gesture, find the index of the mapView.selectedMarker in the array, retrieve the next one and update mapView.selectedMarker. The map might automatically scroll to the marker, but if not, you can do this with setCamera:.
Related
I am implementing voiceover in my existing application.
I am using voiceover in the table view alphabet filter. When I click any one of the alphabets from alphabet filter, the corresponding content list is not displayed in the table view.
I just tried how it works in the iPhone contact list. I faced the same problem in the contact list. I don't know if this the issue or this is the normal functionality. Because of contact list also giving the same result.
The following response I'm getting in the voiceover
table index adjustable swipe up or down with one finger to adjust the value
Please check the screenshot
Please advise and help me to resolve or handle for this issue
It sounds like you are getting the expected behavior, especially if it's the same behavior as Contacts.
VoiceOver's interaction model
VoiceOver uses an interaction model that is based on "focus" and "act". Instead of a single tap to interact with buttons and other control on the screen, a single tap on an element will "focus" on that element. At this point VoiceOver will read information about that element such as its "label", "value" (if any), "traits" (how it behaves), and "hint" (if any).
The user can also swipe left or right with one finger to move focus to the previous or next element. You will find that a lot of VoiceOver's gestures can happen anywhere on the screen. For example, a one finger double tap is used to "activate" an element (for example to press a focused button). In this case it doesn't matter if the double tap happens on the focused element or anywhere else on the screen.
More specifically about the table view index
The same things apply to the table view index. A single tap on the index will focus the index, treating the entire index as one intractable element. The index has the "adjustable" trait, which is why VoiceOver both reads "adjustable", but also reads an explanation of that interaction: "swipe up or down with one finger to adjust the value".
With the index focused (like in that screenshot) you can swipe up with one finger anywhere on the screen to "increment" the value and swipe down with one finger anywhere on the screen to "decrement" the value. (However, in the case of the table view index, these are inverted to match the scrolling direction).
If you start by (quickly) swiping up with one finger you may notice that nothing happens except that a soft "dong" sound is playing. This lets the user know that the value is at its bounds and cannot be incremented or decremented any further. (You can try the same thing with for example the volume slider in Music (focused the volume slider and swipe up or down with one finger) and notice that the "dong" sound plays when the volume can't go lower/higher).
If you instead swipe down with one finger you may notice that VoiceOver reads "B" and that the table view scrolled down to the "B"-section. Now if you swipe down again it will read "C" and scroll down to that section. At this point you can also swipe up to go up one section again.
Some additional information
If you swipe right with one finger (the gesture to navigate to the next element) with the table view index in focus you may note that it changes focus to the first table view cell of the "selected" section. From there, the next and previous elements are the other cells in the table view.
With the table view header or cell in focus, swiping up or down anywhere on the screen with three fingers will scroll the table view up or down, one "page" at a time.
You can read more about VoiceOver and Accessibility on iOS on Apple's developer site.
I have a list of charts in a tableview (each cell is a chart view) and I'm trying to add a custom marker (tried with balloonmarker) so that when the user taps on one of the data points a marker should pop up and show additional info about this point. My tableview cell is ChartViewDelegate and I implemented chartValueSelected method in it so that this thing could work but the problem is that most of the taps don't register at all. Basically the app doesn't recognize which view the user is tapping on, so I have to scroll up and down until it recognizes that I'm selecting a specific view. These cells take up the whole screen so I can't understand why it has such a hard time determining the view I'm tapping.
I have a map view with some annotations on it. I use a custom pin image for the annotations.
I am transitioning away from showing callouts to having a table view slide up from the bottom to show information about the annotation that was touched. As-is there is no way to see on the map which annotation is selected.
What I would like is to have the annotation to animate to a highlighted appearance when it is selected, and animate to a regular appearance when it's deselected, much like a system style UIButton in the selected state. How can I achieve this?
I think the easiest way is to just switch between different image files when the user taps on the annotation. I don't think you'll need to animate it - it looks fine without animation in our app.
If the user taps on an item in the tableView, you'll want to switch to the highlighted image and probably center the map at that point as well.
The only problem we've had is trying to keep the highlighted annotation view in front of other overlapping annotation views. Annotation view z-order is, as far as I know, not something that can be consistently and easily controlled.
I have a view with 3 buttons (Europe, Asia, America) and a MKMapView.
If one of these buttons was clicked, i need to show the specific continent.
In
MKGeometry.h (Mapkit Framework)
there is a constant
MKMapRectWorld
which i can use to show the whole world.
Is there something similar for continents?
If not, what is the best way to determine all informations i need for creating a MKCoordinateRegion?
Use Google Earth or Goole Maps to work out the lat/long boundaries and then call setRegion on your map view.
I have two UITableView in my iPad application.
I want to drag a cell from one tableview and drop onto another tableview.
Please suggest me any idea how can I Implement drag & drop between two tables in iPad ?
Thanks in advance
I've implemented a solution to this before.
Approach
The main component of the solution is class that listens for drag / drop events and broadcasts them to a delegate; I called this component the gesture coordinator. It handles the events emitted from a UIGestureRecognizer to calculate the 'drag and drop' state and notify the delegate.
For example, a view controller acting as its delegate would receive messages about when items have been exchanged between collections and then update its collection views and data sources.
The gesture coordinator is essentially just a drag-and-drop decorator for a UIGestureRecognizer.
Gesture Coordinator Logic
Here are the propositions that I considered when implementing the gesture coordinator:
A collection is a view that contains and array of child items.
A drag arena consists of a superview and an ordered set of collections that exist as subviews within that superview.
The order of the collections in the drag arena determines their drag / drop priority. That is, if a collection sits at the beginning of the drag arena's ordered set of collections, then drags and drops occurring on that collection will be recognized in place of any of the later collections in the set.
A drag starts if and only if a gesture is started within the bounds of a draggable item of a collection in the drag arena.
Dragging occurs if and only if, immediately after a drag has been started, the location of the gesture changes within the drag arena.
A drag stops if and only if immediately after dragging the gesture stops, is cancelled or finishes.
A deletion occurs if and only if the drag stops at a point which is specified as being deletable. For example, the user may designate certain bounds within the drag arena to be 'delete on drop' areas.
A rearrange occurs if and only if the drag stops within the bounds of the collection that it started in, on a different item in that collection which is specified as being rearrangeable, and on a point in the drag arena that is not specified as being deletable.
A drop occurs if and only if the drag stops within the bounds of another collection in the drag arena, on a specific item or point that is specified as droppable within that collection, and on a point in the drag arena which is not specified as being deletable.
References
Documentation
Use Case examples
Once you touch upon a row in one table.. You must create a image of the row you want to drag
This could be done by editing didSelectRowAtIndexPath function from where you can actually determine which row was selected.
then move that image along with your drag (by custom implementation of touches:Moved)
CGPoint gesturepoint = [touch locationInView:self.view];
imageview.centre = gesturepoint;
Now you can do this help with dragDelegate and dropDelegate of UITableView from iOS11
Several steps:
Add long press gesture recoginzer, when it's detected, get UIImage from cell you press.
Remove the cell from the tableview (deleteRowsAtIndexPaths:withRowAnimation:). Created a UIImageView by the UIImage you get from step 1. Move the UIImageView while you move the finger.
When the end of gesture, decide the tableview to drop and the location to insert. Then add the selected data to the data source (insertRowsAtIndexPaths:withRowAnimation:).