Super, para ver el 煤ltimo post en realidad hay que hacer posts.first en lugar de posts.last, ya que posts.last es el ultimo elemento de la tabla, es decir el primer tweet 馃槢
Hola, Apple
Hablemos de iOS
Conozcamos XCode
驴Necesito un iPhone para ser iOS Developer?
Tu primera app en iOS
隆Hola, Mundo Apple!
Navegaci贸n con UINavigationController
Modales en la navegaci贸n
Utilizando controles en c贸digo
Autolayout vs SwiftUI
Autolayout
Listas con UITableView
Celdas personalizadas para nuestras listas.
Persistencia: UserDefaults
Manejo de dependencias
CocoaPods
Carthage
Servicios Web
Primeros pasos para consumir servicios
Afinando detalles para consumir servicios
Convirtiendo los JSON a modelos
Alamofire
Proyecto: PlatziTweets
Bienvenido a PlatziTweets
Configurando Proyecto
Dise帽ando vistas iniciales
Configuraci贸n de vistas iniciales
Configuraci贸n de registro
Descripci贸n de la API de PlatziTweets
Conexi贸n de la API y Autenticaci贸n
Registro de usuarios
Dise帽o del Tweet
Obteniendo Tweets
Creaci贸n de vista para publicar Tweets
Publicando Tweets
Borrando Tweets
Integraci贸n de la c谩mara
Conexi贸n con Firebase
Configuraci贸n de XCode para correr app
Subir imagen a Firebase
Publicar Tweet con imagen
Tomando Videos para el Tweet
Publicar Tweet con video
Detalles del video
Accediendo al GPS
Implementando mapas con MapsKit
Mostrando todos los estudiantes en el mapa
Retos del proyecto
En producci贸n
Enviar a pruebas con Firebase Distribution
Enviar tu aplicaci贸n a APP Store Connect
Distribuci贸n de tu app con TestFlight
iOS Avanzado
Dark Mode
SwiftUI
Terminando detalles de una vista con SwiftUI
Objective-C
Hola, iOS Developer
Felicidades
Expert Session: 隆nuevo espacio para resolver tus dudas sobre el desarrollo de Apps para iOS!
You don't have access to this class
Keep learning! Join and start boosting your career
Setting up maps in iOS can be a painstaking process, but once you acquire the necessary skills, you can create impressive apps that offer great functionality to users. Below, we'll explore how to avoid common problems when programming maps and how to extend your capabilities to work with and visualize geographic data effectively.
When programming the size of items in iOS, such as a map, you may face margin issues. This can happen due to the view lifecycle that does not always guarantee the full size of the scheduled element, especially if the size adjustment is made during view loading(viewDidLoad
). To fix it:
viewDidAppear
lifecycle method.Passing data between screens is crucial, especially if we work with multiple View Controllers
in an application. Using prepare(for segue: UIStoryboardSegue, sender: Any?)
is a great way to handle transitions and pass specific information.
"showMap"
.View Controller
, such as MapViewController
.posts
through mapViewController.posts
.if segue.identifier == "showMap" { if let mapViewController = segue.destination as? MapViewController { mapViewController.posts = dataSource.filter { $0.hasLocation } }}
Adding visual markers to your maps is critical for geographic interaction within an application. The process includes creating annotations that indicate specific locations on the map.
MKPointAnnotation
to set a marker.posts
.for post in posts { let marker = MKPointAnnotation() marker.coordinate = CLLocationCoordinate2D(latitude: post.location.latitude, longitude: post.location.longitude) marker.title = post.text marker.subtitle = post.author.name mapView.addAnnotation(marker)}
Displaying the map focused on a specific location helps to improve the user experience. You can achieve this by setting the map camera to focus on the last point of interest automatically.
MKMapCamera
.if let lastPost = posts.last { let lastPostLocation = CLLocationCoordinate2D(latitude: lastPost.location.latitude, longitude: lastPost.location.longitude) let mapCamera = MKMapCamera(lookingAtCenter: lastPostLocation, fromDistance: 30, pitch: 0, heading: 12) mapView.setCamera(mapCamera, animated: true)}
Finally, we recommend you explore more functionality through MapKit
to add interactivity and customization to your maps. Some ideas include:
Keep exploring and practicing, as the potential of maps is vast and impressive. This will not only enrich your apps but also broaden your knowledge of iOS development.
Contributions 1
Questions 0
Super, para ver el 煤ltimo post en realidad hay que hacer posts.first en lugar de posts.last, ya que posts.last es el ultimo elemento de la tabla, es decir el primer tweet 馃槢
Want to see more contributions, questions and answers from the community?