Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinchangesbygaurang #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/ArtAround.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@
B034FB1D1BEB5B690084B89C /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B034FB131BEB5B690084B89C /* [email protected] */; };
B034FB1E1BEB5B690084B89C /* yellow.png in Resources */ = {isa = PBXBuildFile; fileRef = B034FB141BEB5B690084B89C /* yellow.png */; };
B034FB1F1BEB5B690084B89C /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B034FB151BEB5B690084B89C /* [email protected] */; };
B034FB221BEB5B800084B89C /* ArtAround-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B034FB201BEB5B800084B89C /* ArtAround-Info.plist */; };
B034FB231BEB5B800084B89C /* ArtAround-Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = B034FB211BEB5B800084B89C /* ArtAround-Keys.plist */; };
B034FB261BEB5C130084B89C /* TagParser.m in Sources */ = {isa = PBXBuildFile; fileRef = B034FB251BEB5C130084B89C /* TagParser.m */; };
B034FB291BEB5C230084B89C /* Tag.m in Sources */ = {isa = PBXBuildFile; fileRef = B034FB281BEB5C230084B89C /* Tag.m */; };
B04326471C1075F6004E12A6 /* ArtAround-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B04326451C1075F6004E12A6 /* ArtAround-Info.plist */; };
B04326481C1075F6004E12A6 /* ArtAround-Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = B04326461C1075F6004E12A6 /* ArtAround-Keys.plist */; };
C91B24B814CF624B000B342F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = C91B24B414CF624B000B342F /* [email protected] */; };
C91B24B914CF624B000B342F /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = C91B24B514CF624B000B342F /* [email protected] */; };
C91B24BA14CF624B000B342F /* FavoriteButton.png in Resources */ = {isa = PBXBuildFile; fileRef = C91B24B614CF624B000B342F /* FavoriteButton.png */; };
Expand Down Expand Up @@ -412,12 +412,12 @@
B034FB131BEB5B690084B89C /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
B034FB141BEB5B690084B89C /* yellow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = yellow.png; sourceTree = "<group>"; };
B034FB151BEB5B690084B89C /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
B034FB201BEB5B800084B89C /* ArtAround-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ArtAround-Info.plist"; sourceTree = "<group>"; };
B034FB211BEB5B800084B89C /* ArtAround-Keys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ArtAround-Keys.plist"; sourceTree = "<group>"; };
B034FB241BEB5C130084B89C /* TagParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagParser.h; sourceTree = "<group>"; };
B034FB251BEB5C130084B89C /* TagParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TagParser.m; sourceTree = "<group>"; };
B034FB271BEB5C230084B89C /* Tag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tag.h; sourceTree = "<group>"; };
B034FB281BEB5C230084B89C /* Tag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tag.m; sourceTree = "<group>"; };
B04326451C1075F6004E12A6 /* ArtAround-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ArtAround-Info.plist"; sourceTree = "<group>"; };
B04326461C1075F6004E12A6 /* ArtAround-Keys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ArtAround-Keys.plist"; sourceTree = "<group>"; };
C91B24B414CF624B000B342F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
C91B24B514CF624B000B342F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
C91B24B614CF624B000B342F /* FavoriteButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = FavoriteButton.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1205,8 +1205,8 @@
isa = PBXGroup;
children = (
CA5E10E31405F0520075DAB8 /* ArtAround.xcdatamodeld */,
B034FB201BEB5B800084B89C /* ArtAround-Info.plist */,
B034FB211BEB5B800084B89C /* ArtAround-Keys.plist */,
B04326451C1075F6004E12A6 /* ArtAround-Info.plist */,
B04326461C1075F6004E12A6 /* ArtAround-Keys.plist */,
CAD47C191410AA5D0059C69A /* ArtAround-Info-Example.plist */,
CAFF2CDE1409F34B00C98C0E /* ArtAround-Keys-Example.plist */,
CA5E10DC1405F0520075DAB8 /* ArtAround-Prefix.pch */,
Expand Down Expand Up @@ -1399,7 +1399,7 @@
CA1AEA00140C906200C56C4D /* Locate.png in Resources */,
CA1AEA01140C906200C56C4D /* [email protected] in Resources */,
965C494A1B257C7B00964284 /* [email protected] in Resources */,
B034FB221BEB5B800084B89C /* ArtAround-Info.plist in Resources */,
B04326471C1075F6004E12A6 /* ArtAround-Info.plist in Resources */,
CA1AEA02140C906200C56C4D /* LocatePressed.png in Resources */,
CA1AEA03140C906200C56C4D /* [email protected] in Resources */,
CA1AEA04140C906200C56C4D /* ShareArt.png in Resources */,
Expand Down Expand Up @@ -1538,7 +1538,7 @@
464C9ACE1794F28B00387F58 /* introImage0.png in Resources */,
464C9ACF1794F28B00387F58 /* [email protected] in Resources */,
464C9AD41795040200387F58 /* addIcon.png in Resources */,
B034FB231BEB5B800084B89C /* ArtAround-Keys.plist in Resources */,
B04326481C1075F6004E12A6 /* ArtAround-Keys.plist in Resources */,
464C9AD51795040200387F58 /* [email protected] in Resources */,
464C9AD61795040200387F58 /* locateIcon.png in Resources */,
464C9AD71795040200387F58 /* [email protected] in Resources */,
Expand Down
50 changes: 34 additions & 16 deletions src/ArtAround/Classes/Views&Controllers/MapViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,33 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno
//setup the annotation view for the annotation
int index = [(ArtAnnotation *)annotation index];
if ([_items count] > index) {


NSString *string2 =[categoryArray objectAtIndex:index ];

NSArray * array2 = [string2 componentsSeparatedByString:@","];
for (int i =0; i<array2.count; i++) {
if ([[array2 objectAtIndex:i ]isEqualToString:@"Museum"] || [[array2 objectAtIndex:i ]isEqualToString:@"Gallery"] ) {
//setup the pin image and reuse identifier
NSString *reuseIdentifier = nil;
UIImage *pinImage = nil;

//new single pinart
reuseIdentifier = @"art";
pinImage = [UIImage imageNamed:@"blue.png"];

//setup the annotation view
ArtAnnotationView *pin = [[[ArtAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:reuseIdentifier] autorelease];
[pin setImage:pinImage];
[pin setRightCalloutAccessoryView:[UIButton buttonWithType:UIButtonTypeDetailDisclosure]];
[pin setCanShowCallout:NO];
[pin setTag:index];

//return the annotion view
return pin;
}
}

NSString *string =[tagArray objectAtIndex:index ];
NSMutableArray *arraySort = [[NSMutableArray alloc] init];
NSArray * array = [[NSArray alloc] init];
Expand Down Expand Up @@ -812,7 +839,7 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno
//return the annotion view
return pin;
}
else if ([[array objectAtIndex:i ]isEqualToString:@"Catalog"]||[[array objectAtIndex:i ]isEqualToString:@"catalog"]) {
if ([[array objectAtIndex:i ]isEqualToString:@"Catalog"]||[[array objectAtIndex:i ]isEqualToString:@"catalog"]) {
//setup the pin image and reuse identifier
NSString *reuseIdentifier = nil;
UIImage *pinImage = nil;
Expand Down Expand Up @@ -851,10 +878,6 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno
//return the annotion view
return pin;
}




if ([[array objectAtIndex:i ]isEqualToString:@"Artchive"]||[[array objectAtIndex:i ]isEqualToString:@"artchive"]) {
//setup the pin image and reuse identifier
NSString *reuseIdentifier = nil;
Expand All @@ -874,20 +897,15 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno
//return the annotion view
return pin;
}

}
NSString *string2 =[categoryArray objectAtIndex:index ];

NSArray * array2 = [string2 componentsSeparatedByString:@","];
for (int i =0; i<array2.count; i++) {
if ([[array2 objectAtIndex:i ]isEqualToString:@"Museum"] || [[array2 objectAtIndex:i ]isEqualToString:@"Gallery"] ) {
else
{
//setup the pin image and reuse identifier
NSString *reuseIdentifier = nil;
UIImage *pinImage = nil;

//new single pinart
reuseIdentifier = @"art";
pinImage = [UIImage imageNamed:@"blue.png"];
pinImage = [UIImage imageNamed:@"red.png"];

//setup the annotation view
ArtAnnotationView *pin = [[[ArtAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:reuseIdentifier] autorelease];
Expand All @@ -898,9 +916,9 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnno

//return the annotion view
return pin;
}}


}
}
}

} else if ([annotation isKindOfClass:[CalloutAnnotationView class]]) {
Expand Down