Select to view content in your preferred language

legend not working after updating

1351
6
Jump to solution
10-29-2012 12:57 PM
HamzaHaroon
Regular Contributor
i updated xcode to make my app run with ios6, and my legend stopped working for some reason. also tried updating arcgis sdk, still same problem. I know its not my code because i tried earlier version of my code and legen still wasnt working.
does anyone else have similar problems?
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
You need to make following changes in your code to get it to work.

GMViewController.m - In prepareForSegue method make following changes,

vc.legendDataSource = self.legendDataSource;
//vc.legendDataSource.legendInfos = self.legendDataSource.legendInfos;

GMLegendController.m - In viewDidLoad comment out legendDataSource init code line,

//legendDataSource = [[GMLegendDataSource alloc] init];

Regards,
Nimesh

View solution in original post

0 Kudos
6 Replies
NimeshJarecha
Esri Regular Contributor
The Xcode upgrade should not make any difference to your legend code. Please post a sample application and i'll have a look at it.

Regards,
Nimesh
0 Kudos
HamzaHaroon
Regular Contributor
attached here.
0 Kudos
NimeshJarecha
Esri Regular Contributor
I ran project and it shows following. Are you not seeing this?

[ATTACH=CONFIG]18849[/ATTACH]

Regards,
Nimesh
0 Kudos
HamzaHaroon
Regular Contributor
no, it shows up blank for me. I am using iPad 6.0 simulator
0 Kudos
NimeshJarecha
Esri Regular Contributor
You need to make following changes in your code to get it to work.

GMViewController.m - In prepareForSegue method make following changes,

vc.legendDataSource = self.legendDataSource;
//vc.legendDataSource.legendInfos = self.legendDataSource.legendInfos;

GMLegendController.m - In viewDidLoad comment out legendDataSource init code line,

//legendDataSource = [[GMLegendDataSource alloc] init];

Regards,
Nimesh
0 Kudos
HamzaHaroon
Regular Contributor
thanks it works now
0 Kudos