Post

Replies

Boosts

Views

Activity

Select annotation in Map
Hello everyone. I have the following problem. I have a view with a map in which I visualize several points (annotation point). My problem is that when I select a point, I don't get any event to check, for example, the name of the annotation point, to then carry out operations. Tengo un View con un mapa @IBOutlet weak var Mapa: MKMapView! I make several queries to a database that returns a series of points (annotation points). To see which point I select, you would have to launch, once you click on the map, one of these procedures... right? extension DatosCercanos: MKMapViewDelegate { func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) { print("hola") } func mapView(_ mapView: MKMapView, didDeselect annotation: MKAnnotation) { print("hola") } func mapView(_ mapView: MKMapView, didSelect annotation: MKAnnotation) { print("hola") } func mapView(_ mapView: MKMapView, didDeselect view:MKAnnotationView) { print("hola") } As you will see, I have put several procedures to see if any of them work, but none are executed, none jump to the event of pressing an annotation point What am I doing wrong? I don't understand why the event is not executed. Some help? Thank you.
1
0
709
Mar ’23
Database error when testing on device
Hello everyone. I have the following problem. I have an application that queries a database in sqlite. When I run the app in xcode on my mac I give it the path to the database to make it work. So far so good. But when I want to test this application on a physical device (iPhone 11), I get the error that the application cannot find the database. My question or problem is where I have to store the database on the iPhone so that the application can make the queries. Thank you.
9
0
2.6k
Feb ’23
How i do execute sqlite in iphone
I have the following problem. An application that has a sqlite database. I run the application in xcode, with the simulator So I get the path, and copy the sqlite database, so the application works perfectly in xcode. The problem is when I connect my iphone and try to run the application. Because the previous code gives me a route on the iphone, and I try to put the sqlite database there but it does not run, the application is blocked because it cannot find the database, even if I put it there. I don't know if what I am doing is correct or there is another way to do it. I'm going crazy looking for possible solutions on the internet, but none works for me and I've been standing for 6 months trying to run the application on the iphone. Please, some help or advice, I would appreciate it. Some time ago, someone told me how to do it using iTunes, but it doesn't exist anymore, so ... how can I do it now? help !!!!!!!!!!!!!! Many thanks.
0
0
496
Apr ’21
Problem tab bar and segue
Hi all. Please can someone help me. I explain my problem, I have a view that is a tableview, with 4 cells. This tablaview is connected to a segue with a tab bar and it has 3 tabs, called car, train, plane. My problem is, when we press a cell in the tableview, some variables are loaded with values, these values ​​I want to be loaded in the tabs of the tableview (car, train, plane), I try to connect using the segue. I pass segue from the tableview, to the tabbar controller and then to each of the tabs when they load, but it doesn't work, so my question is. How do I pass variables from the tableview to any of the 3 tabs or views that are in the tab bar? Thank you !!
0
0
342
Jul ’20
Xcode emulator problem
Good morning to everyone. I have a big question with Xcode, to see if someone can help me, please. I explain: I am doing a view and I insert 3 buttons with their corresponding constraints. When I do a preview in xcode (using the editor settings), the view is perfect for me. But when I run it on an emulator for both iphone 8 or any other, the buttons are reduced or are out of place or do not appear ... and I do not understand what the problem is, due to the constraints and everything is perfect. Also, in the xcode when I select some iphone emulators I get 2 of the same type. For example, I get 2 from the iPhone SE (2nd generation), specifically I get iPhone SE (2nd generation) (040BBDPC-2F ....) and iPhone SE (2nd generation) (161B06F7-3DA ...), Could someone help me or tell me something about this matter? I have had the project paralyzed almost 15 days ago. THANK YOU SO MUCH EVERYONE!!
2
0
809
Jun ’20
constraints disabled
Hello everybody. I am new to programming and I have the problem that in the Xcode when I want to put constraints on objects, I press on the constraints button, it appears disabled, and I don't know why. Please help .. if I don't put the constraints the objects don't adapt to the device. Thank you !!
7
0
2.9k
Feb ’20
How i do execute sqlite in iphone?
I have the following problem. An application that has a sqlite database. I run the application in xcode, with the simulator. I have the following code to know where I have to put the database.sqlite3 *bd;NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"bd.sqlite"]; NSLog(@"bd route is ---- %@",dbPath);So I get the path, and copy the sqlite database, so the application works perfectly in xcode. The problem is when I connect my iphone and try to run the application. Because the previous code gives me a route on the iphone, and I try to put the sqlite database there but it does not run, the application is blocked because it cannot find the database, even if I put it there. I don't know if what I am doing is correct or there is another way to do it. I'm going crazy looking for possible solutions on the internet, but none works for me and I've been standing for 3 months trying to run the application on the iphone. Please, some help or advice, I would appreciate it. Many thanks.
11
0
10k
Sep ’19