I am working on an app based on the Map View, and I wanted to implement something like Foursquare : in front of the map that you can scroll and that is linked with the pins.
I tried with the Collection View but without success.. Does anyone know how to do it or have an idea?
Thanks a lot.
You can achieve this by adding UICollectionView above MapView (use addSubview method or add in storyboard) and set background color of collection view to UIColor.clearColor. By this the collection view cell will look floating above the map view.
Related
I'm relatively new to Swift, so any help is appreciated!
I‘m searching for a way to use a pull up UITableView on top of a MapView, just like it is in the Apple Maps App. Instead of the search bar I would like to have a title, but that is a next step.
I couldn‘t find any guide on how to do anything like this on the internet, so even if you just have a guess leading in the right direction, I would be thankful!
Right now I have a map view inside a NavigationController inside a TabBarController.
Unfortunately I can’t post pictures, as this is my first question, but it should look like this http://media.idownloadblog.com/wp-content/uploads/2016/07/Apple-MAps-PArkopedia-silver-iPhone-screenshot-001.png
just put a TableView on the MapView in your storyboard, add your constraints for how big/where you want to be and set the background to be clear color.
Nothing special to it/different than setting up a normal TableView.
I have a TableView with a list of items and a MapView.
I want to touch an item in the TableView and it will be added to the MapView.
Both views are visible at the same time (side by side) so I don't think I can use the MapView's viewDidLoad function. (way too early in the process)
I do understand how to add overlays on the MapView, but not initiated from a different class and swift file.
How do I get access to the map add an overlay on the map from my TableView, since it is in a different class and swift file.
Thanks for any tips and suggestions (and maybe a quick code snip perhaps)
Bryan
I'm looking for a way to display the transit/subway lines in a MapKit view. I'd basically like the same view as the "Transit" view in the Maps application. I can't find the right overlay or map type. Thanks!
Transit map type is not available yet. You might have to customize your own mapView.
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 master-detail style application that displays locations in the table view, and in the detail, shows various pictures from that location.
My current detail shows only the picture from the table view, but I want to be able to scroll left and right inside the UIImageView area to see the other pictures from the same location (which will be loaded from their URL's with SDWebImage)
How can I make a horizontal table view of UIImages that displays one image at a time? (Or should I just find a pre-built carousel library?)
Bonus points for the overachievers (Not necessary for best answer): How would I make another table view below the main UIImage that shows a small table of all the images, with a border around the selected photo? [More concerned with the custom table view implementation than the bordering]
Check out UICollectionView and UICollectionViewController. Provide your own UICollectionViewFlowLayout and set the scrollDirection property to UICollectionViewScrollDirectionHorizontal.
Collection View reference:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/Introduction/Introduction.html
Collection View sample:
http://developer.apple.com/library/ios/#samplecode/CollectionView-Simple/Introduction/Intro.html
Use UIScrollView and enable pagging. The same for the small pictures preview but of course without pagging.
Try this example and source code
Exemple 1
Exemple 2