Authored by Hal Mueller

added buttons to SampleMap to exercise -removeAllCachedImages

... ... @@ -21,4 +21,6 @@
@property(nonatomic,retain) IBOutlet UITextField *minZoom;
@property(nonatomic,retain) IBOutlet UITextField *maxZoom;
- (IBAction)clearSharedNSURLCache;
- (IBAction)clearMapContentsCachedImages;
@end
... ...
... ... @@ -43,9 +43,9 @@
[centerLatitude setText:[NSString stringWithFormat:@"%f", mapCenter.latitude]];
[centerLongitude setText:[NSString stringWithFormat:@"%f", mapCenter.longitude]];
[zoomLevel setText:[NSString stringWithFormat:@"%f", contents.zoom]];
[maxZoom setText:[NSString stringWithFormat:@"%f", contents.maxZoom]];
[minZoom setText:[NSString stringWithFormat:@"%f", contents.minZoom]];
[zoomLevel setText:[NSString stringWithFormat:@"%.1f", contents.zoom]];
[maxZoom setText:[NSString stringWithFormat:@"%.1f", contents.maxZoom]];
[minZoom setText:[NSString stringWithFormat:@"%.1f", contents.minZoom]];
}
... ... @@ -69,5 +69,15 @@
[super dealloc];
}
- (IBAction)clearSharedNSURLCache
{
[[NSURLCache sharedURLCache] removeAllCachedResponses];
}
- (IBAction)clearMapContentsCachedImages
{
[contents removeAllCachedImages];
}
@end
... ...
... ... @@ -19,7 +19,6 @@
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
NSLog(@"initWithNibName");
}
return self;
}
... ... @@ -27,7 +26,6 @@
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
NSLog(@"viewDidLoad");
[super viewDidLoad];
[mapView setDelegate:self];
id myTilesource = [[[RMCloudMadeMapSource alloc] initWithAccessKey:@"0199bdee456e59ce950b0156029d6934" styleNumber:999] autorelease];
... ...
... ... @@ -160,7 +160,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Zoom Minimun</string>
<string key="IBUIText">Zoom Minimum</string>
<reference key="IBUITextColor" ref="372796082"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
... ... @@ -226,6 +226,55 @@
<bool key="IBUIEnablesReturnKeyAutomatically">YES</bool>
</object>
</object>
<object class="IBUIButton" id="501755612">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 304}, {280, 37}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<object class="NSFont" key="IBUIFont" id="187219318">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">1.500000e+01</double>
<int key="NSfFlags">16</int>
</object>
<int key="IBUIButtonType">1</int>
<string key="IBUIHighlightedTitle">Clear shared NSURL cache</string>
<string key="IBUIDisabledTitle">Clear shared NSURL cache</string>
<string key="IBUISelectedTitle">Clear shared NSURL cache</string>
<string key="IBUINormalTitle">Clear shared NSURL cache</string>
<object class="NSColor" key="IBUIHighlightedTitleColor" id="461177009">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
</object>
<object class="IBUIButton" id="543449173">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 251}, {280, 37}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIFont" ref="187219318"/>
<int key="IBUIButtonType">1</int>
<string key="IBUIHighlightedTitle">Clear RouteMe image cache</string>
<string key="IBUIDisabledTitle">Clear RouteMe image cache</string>
<string key="IBUISelectedTitle">Clear RouteMe image cache</string>
<string key="IBUINormalTitle">Clear RouteMe image cache</string>
<reference key="IBUIHighlightedTitleColor" ref="461177009"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
</object>
</object>
<string key="NSFrameSize">{320, 460}</string>
<reference key="NSSuperview"/>
... ... @@ -290,6 +339,24 @@
</object>
<int key="connectionID">69</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">clearMapContentsCachedImages</string>
<reference key="source" ref="543449173"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">77</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">clearSharedNSURLCache</string>
<reference key="source" ref="501755612"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">78</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
... ... @@ -328,6 +395,8 @@
<reference ref="146305636"/>
<reference ref="479071672"/>
<reference ref="36853701"/>
<reference ref="501755612"/>
<reference ref="543449173"/>
</object>
<reference key="parent" ref="360949347"/>
</object>
... ... @@ -381,6 +450,16 @@
<reference key="object" ref="36853701"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">70</int>
<reference key="object" ref="501755612"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">76</int>
<reference key="object" ref="543449173"/>
<reference key="parent" ref="249263867"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
... ... @@ -403,6 +482,8 @@
<string>49.IBPluginDependency</string>
<string>50.IBPluginDependency</string>
<string>51.IBPluginDependency</string>
<string>70.IBPluginDependency</string>
<string>76.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
... ... @@ -424,6 +505,8 @@
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
... ... @@ -446,7 +529,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">69</int>
<int key="maxID">78</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
... ... @@ -462,6 +545,19 @@
<object class="IBPartialClassDescription">
<string key="className">FlipsideViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>clearMapContentsCachedImages</string>
<string>clearSharedNSURLCache</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
... ... @@ -489,7 +585,7 @@
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.LastKnownRelativeProjectPath">Sample2.xcodeproj</string>
<string key="IBDocument.LastKnownRelativeProjectPath">SampleMap.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
... ...