Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from ericreber/master

Made it compatible with ARC
  • Loading branch information...
commit 2cd443e4203d9f3b61304ec47d1ac213d6217421 2 parents 6c6e0d5 + d62aade
@MugunthKumar authored
Showing with 5 additions and 18 deletions.
  1. +2 −15 MKInfoBundle/MKInfoPanel.h
  2. +3 −3 MKInfoBundle/MKInfoPanel.m
View
17 MKInfoBundle/MKInfoPanel.h
@@ -6,6 +6,7 @@
// Copyright 2011 Steinlogic. All rights reserved.
// Permission granted to do anything, commercial/non-commercial with this file apart from removing the line/URL above
// Read my blog post at http://mk.sg/8e on how to use this code
+// Compatible with ARC by Reber Eric
// As a side note on using this code, you might consider giving some credit to me by
// 1) linking my website from your app's website
@@ -25,21 +26,7 @@ typedef enum {
MKInfoPanelTypeError
} MKInfoPanelType;
-@interface MKInfoPanel : UIView {
-
- UILabel *_titleLabel;
- UILabel *_detailLabel;
-
- UIImageView *_thumbImage;
- UIImageView *_backgroundGradient;
-
- SEL _onTouched;
-
- id _delegate;
- SEL _onFinished;
-
- MKInfoPanelType type_;
-}
+@interface MKInfoPanel : UIView
@property (nonatomic, assign) IBOutlet UILabel *titleLabel;
@property (nonatomic, assign) IBOutlet UILabel *detailLabel;
View
6 MKInfoBundle/MKInfoPanel.m
@@ -6,6 +6,7 @@
// Copyright 2011 Steinlogic. All rights reserved.
// Permission granted to do anything, commercial/non-commercial with this file apart from removing the line/URL above
// Read my blog post at http://mk.sg/8e on how to use this code
+// Compatible with ARC by Reber Eric
// As a side note on using this code, you might consider giving some credit to me by
// 1) linking my website from your app's website
@@ -67,9 +68,8 @@ - (id)initWithCoder:(NSCoder *)aDecoder {
}
- (void)dealloc {
- [_delegate performSelector:_onFinished];
+ objc_msgSend(_delegate, _onFinished);
- [super dealloc];
}
////////////////////////////////////////////////////////////////////////
@@ -185,7 +185,7 @@ +(BOOL)hideAllPanelsUnderView:(UIView*)view
////////////////////////////////////////////////////////////////////////
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
- [self performSelector:_onTouched];
+ objc_msgSend(self, _onTouched);
}
////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.