This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface AnnotationTest : NSObject | |
@MyAnnotation (type="surname") | |
@property (nonatomic, copy) NSString *name; | |
@end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MTLocation How-To | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// 1. Create MapView | |
self.mapView = [MKMapView mapViewInSuperview:self.view]; | |
// 2. Create BarButtonItem | |
self.locationItem = [MTLocateMeBarButtonItem userTrackingBarButtonItemForMapView:self.mapView]; // @property (nonatomic, strong) UIBarButtonItem *locationItem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation { | |
// .. Code for other annotations … | |
if ([annotation isMemberOfClass:[SPCluster class]]) { | |
MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:kClusterAnnotationViewIdentifier]; | |
if (!annotationView) { | |
annotationView = [[SPClusterView alloc] initWithAnnotation:annotation reuseIdentifier:kClusterAnnotationViewIdentifier]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Start Genius for current playing track and display Growl Notification | |
tell application "iTunes" | |
activate | |
set curr_track to name of current track | |
set curr_artist to artist of current track | |
set visible of front browser window to true | |
end tell | |
tell application "System Events" |
NewerOlder