ios - iOS7 - Map view pin do not appear until screen is touched -


In my app, I download a set of points from the web service using json. To make the app real in iOS 7, I am using this problem: Places are downloaded, but pins are not portrayed on the map unless the user touches and "tricks" the map. Then they appear and work in all iOS6.

How can I correct that behavior?

EDIT: AddNnotation is called at the end of the method to receive the data, pass them to the mylocaction object:

  - (zero) plotBarPosition: (NSString *) Parsing data_string {// string in JSON NSDictionary * json = [[NSDictionary *] [datos_string1 JSONValue] objectForKey: @ "attributes"]; For (int i = 0; i & lt; [jsn count]; i ++) {/ * crushing every point * / milecation * location = [[mileo ocation elock] Init White Name: Name Lock Coordinates: Coordination Estado: Status Antenna id: antenaid]; [_mapView AddNotation: Location]; }}  

I also tried:

  [_ mapView display selector PermiteTrade: @Selector (with annexation :)with object: location waitingUnitidine: no];  

But in this case, annotation is not visible at all.

and @RAJA's comment, on the main thread Call> addNnotation: or AdNotation: You can call the least change option in your existing code by calling addNnotation: (singular): / p>

  - (zero) plot burst: (NSString *) data_string {// string in JSON NSDictionary * json = [(NSDictionary *) [datos_string1 JSONValue] in objectForKey : @ "FEATURES"]; For (int i = 0; i & lt; [jsn count]; i ++) {/ * crushing every point * / milecation * location = [[mileo ocation elock] Init White Name: Name Lock Coordinates: Coordination Estado: Status Antenna id: antenaid]; // [_ mapView add annotation: location]; [_mapView execute selectorMythrthread: @Selector (Add Annotation :) with object: Location WaitingTone: Yes]; Alternatively, to use  addAnnotations:  (plural), you first add your annotations to a local array and let them view the map an  single  call Together with the changes given below,  and gt; & Gt; & Gt; Description of plot: (NSString *) data_string {// JSON parse the string in NSDictionary * Jason = [[NSplorement *] [Ditos_String1JasonValue] : 

 ObjectForcae: @ "FEATURES"]; // & gt; & Gt; & Gt; Start the array to keep annotations ... NSMutableArray * annotationsToAdd = [NSMutableArray array]; For (int i = 0; i & lt; [jsn count]; i ++) {/ * crushing every point * / milecation * location = [[mileo ocation elock] Init White Name: Name Lock Coordinates: Coordination Estado: Status Antenna id: antenaid]; // & gt; & Gt; & Gt; Comment directly addAnnotation ... // [_ mapView addNnotation: location]; // & gt; & Gt; & Gt; Add annotation to the local array ... [Annotation AddObject: Location]; } // & gt; & Gt; & Gt; Add call annotation: main thread (plural) ... [execute _mapViewInmineTrade: @Selector (with adnotation :) Object: Annotation tabNow wait nowhere: yes]; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -