Permalink
Browse files

Removing synthesize were possible.

  • Loading branch information...
devinross committed Nov 25, 2012
1 parent c354ca1 commit 72c847f60fbf60ec1ee513a6fb4115f5ab9edf59
@@ -33,7 +33,6 @@
#import "TKWindow.h"
@implementation TKAppDelegate
-@synthesize window=_window;

This comment has been minimized.

Show comment Hide comment
@chisj

chisj Nov 26, 2012

The Demo project were crashed while Launching without this line.
My xcode is 4.5.2.

@chisj

chisj Nov 26, 2012

The Demo project were crashed while Launching without this line.
My xcode is 4.5.2.

- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -56,7 +56,6 @@ - (void) layoutSubviews {
- (void) setSelected:(BOOL)selected animated:(BOOL)animated {
-
[super setSelected:selected animated:animated];
if(selected)
@@ -66,7 +65,6 @@ - (void) setSelected:(BOOL)selected animated:(BOOL)animated {
}
- (void) setHighlighted:(BOOL)highlight animated:(BOOL)animated {
-
[super setHighlighted:highlight animated:animated];
if(highlight)
@@ -595,8 +595,7 @@ @interface TKCalendarMonthView ()
#pragma mark -
@implementation TKCalendarMonthView
-@synthesize delegate,dataSource;
-@synthesize tileBox=_tileBox;
+
- (id) init{
self = [self initWithSundayAsFirst:YES];
@@ -838,7 +837,7 @@ - (void) selectDate:(NSDate*)date{
return;
}else {
- if ([delegate respondsToSelector:@selector(calendarMonthView:monthShouldChange:animated:)] && ![self.delegate calendarMonthView:self monthShouldChange:month animated:YES] )
+ if ([self.delegate respondsToSelector:@selector(calendarMonthView:monthShouldChange:animated:)] && ![self.delegate calendarMonthView:self monthShouldChange:month animated:YES] )
return;
if ([self.delegate respondsToSelector:@selector(calendarMonthView:monthWillChange:animated:)] )
@@ -893,7 +892,7 @@ - (void) tile:(NSArray*)ar{
UIButton *b = direction > 1 ? self.rightArrow : self.leftArrow;
NSDate* newMonth = [self dateForMonthChange:b];
- if ([self.delegate respondsToSelector:@selector(calendarMonthView:monthShouldChange:animated:)] && ![delegate calendarMonthView:self monthShouldChange:newMonth animated:YES])
+ if ([self.delegate respondsToSelector:@selector(calendarMonthView:monthShouldChange:animated:)] && ![self.delegate calendarMonthView:self monthShouldChange:newMonth animated:YES])
return;
if ([self.delegate respondsToSelector:@selector(calendarMonthView:monthWillChange:animated:)])
@@ -103,7 +103,6 @@ - (UIImage*) predefinedImage:(TKEmptyViewImage)img;
#pragma mark -
@implementation TKEmptyView
-@synthesize imageView=_imageView,titleLabel=_titleLabel,subtitleLabel=_subtitleLabel;
- (id) initWithFrame:(CGRect)frame mask:(UIImage*)image title:(NSString*)titleString subtitle:(NSString*)subtitleString{
@@ -40,7 +40,6 @@ @interface TKImageRequest : TKHTTPRequest
@end
@implementation TKImageRequest
-@synthesize key;
@end
@@ -58,10 +57,6 @@ - (void) _sendRequestForURL:(NSURL*)url key:(NSString*)key tag:(NSUInteger)tag;
#pragma mark -
@implementation TKImageCache
-@synthesize cacheDirectoryName=_cacheDirectoryName,notificationName=_notificationName;
-@synthesize timeTillRefreshCache=_timeTillRefreshCache;
-@synthesize imagesQueue=_imagesQueue;
-@synthesize shouldNetworkActivity;
- (id) init{
self = [self initWithCacheDirectoryName:@"imagecache"];
@@ -32,7 +32,6 @@
#import "TKLabelCell.h"
@implementation TKLabelCell
-@synthesize label=_label;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -33,8 +33,6 @@
@implementation TKLabelFieldCell
-@synthesize field=_field;
-
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil;
@@ -33,7 +33,6 @@
@implementation TKLabelSwitchCell
-@synthesize switcher=_switcher;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -33,7 +33,6 @@
@implementation TKLabelTextFieldCell
-@synthesize field=_field;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
@@ -32,7 +32,6 @@
#import "TKLabelTextViewCell.h"
@implementation TKLabelTextViewCell
-@synthesize textView=_textView;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil;
@@ -32,6 +32,5 @@
#import "TKMapPlace.h"
@implementation TKMapPlace
-@synthesize title,coordinate, color;
@end
@@ -32,23 +32,18 @@
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
-@class TKMapPlace,TKOverlayView,MKMapView;
+@class TKMapPlace,TKOverlayView;
@protocol TKMapViewDelegate;
@interface TKMapView : UIView {
-
- MKMapView *mapView;
- BOOL pinMode;
- id <TKMapViewDelegate> __unsafe_unretained delegate;
-
@private
TKOverlayView *overlay;
}
@property (assign,nonatomic) BOOL pinMode;
@property (strong,nonatomic) MKMapView *mapView;
-@property (unsafe_unretained,nonatomic) id <TKMapViewDelegate> delegate;
+@property (assign,nonatomic) id <TKMapViewDelegate> delegate;
@end
@@ -36,17 +36,13 @@
@interface TKOverlayView : UIView {
id target;
SEL action;
- CGPoint point;
-
}
- (id) initWithFrame:(CGRect)frame target:(id)target action:(SEL)action;
@property (readonly,nonatomic) CGPoint point;
@end
@implementation TKOverlayView
-@synthesize point;
- (id) initWithFrame:(CGRect)frame target:(id)t action:(SEL)a{
-
if(!(self = [super initWithFrame:frame])) return nil;
target = t;
@@ -60,7 +56,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
- point = [touch locationInView:self];
+ _point = [touch locationInView:self];
[target performSelector:action];
}
- (void)dealloc {
@@ -76,8 +72,6 @@ - (void)dealloc {
// TKMAPVIEW IMPLEMENTATION
@implementation TKMapView
-@synthesize mapView,delegate,pinMode;
-
- (id)init{
return [self initWithFrame:CGRectMake(0, 0, 100, 100)];
}
@@ -88,25 +82,25 @@ - (id)initWithFrame:(CGRect)frame {
CGRect b = frame;
b.origin = CGPointZero;
- mapView = [[MKMapView alloc] initWithFrame:b];
- [self addSubview:mapView];
+ self.mapView = [[MKMapView alloc] initWithFrame:b];
+ [self addSubview:self.mapView];
overlay = [[TKOverlayView alloc] initWithFrame:b target:self action:@selector(didTouch)];
overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.2];
- pinMode = NO;
+ self.pinMode = NO;
return self;
}
- (void) didTouch{
- CGRect r = mapView.bounds;
+ CGRect r = self.mapView.bounds;
float longitudePercent = overlay.point.x / r.size.width;
float latitudePercent = overlay.point.y / r.size.height;
- CLLocationCoordinate2D coord = mapView.centerCoordinate;
- MKCoordinateSpan span = mapView.region.span;
+ CLLocationCoordinate2D coord = self.mapView.centerCoordinate;
+ MKCoordinateSpan span = self.mapView.region.span;
float lat = coord.latitude + (span.latitudeDelta/2);
float lon = coord.longitude - (span.longitudeDelta/2);
@@ -116,11 +110,11 @@ - (void) didTouch{
corner.latitude = lat - span.latitudeDelta * latitudePercent; // up and down
corner.longitude = lon + span.longitudeDelta * longitudePercent; // left right
- [delegate didPlacePinAtCoordinate:corner];
+ [self.delegate didPlacePinAtCoordinate:corner];
}
- (void) setPinMode:(BOOL)pinIsMode{
- pinMode = pinIsMode;
- if(pinMode){
+ self.pinMode = pinIsMode;
+ if(self.pinMode){
[self addSubview:overlay];
}else{
[overlay removeFromSuperview];
@@ -33,7 +33,6 @@
#import "UIView+TKCategory.h"
@implementation TKProgressAlertView
-@synthesize progressBar=_progressBar,label=_label;
- (id) initWithProgressTitle:(NSString*)txt{
@@ -35,7 +35,6 @@
#define AnimationIncrement 0.02
@implementation TKProgressBarView
-@synthesize progress=_progress;
- (id) initWithStyle:(TKProgressBarViewStyle)s{
CGRect r = s==TKProgressBarViewStyleLong ? CGRectMake(0, 0, 210, 20) : CGRectMake(0, 0, 180, 42);
@@ -35,7 +35,6 @@
#define AnimationIncrement 0.02
@implementation TKProgressCircleView
-@synthesize progress=_progress,twirlMode=_twirlMode;
- (id) init{
self = [self initWithFrame:CGRectZero];
@@ -31,16 +31,15 @@
#import "TKSwitchCell.h"
@implementation TKSwitchCell
-@synthesize switcher=_switcher;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if(!(self=[super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil;
self.textLabel.backgroundColor = [UIColor clearColor];
- _switcher = [[UISwitch alloc] initWithFrame:CGRectMake(0,0,94,27)];
- [self.contentView addSubview:_switcher];
+ self.switcher = [[UISwitch alloc] initWithFrame:CGRectMake(0,0,94,27)];
+ [self.contentView addSubview:self.switcher];
return self;
@@ -35,8 +35,7 @@
@implementation TKTableViewController
-@synthesize tableView = _tableView, emptyView = _emptyView;
-@synthesize searchBar = _searchBar, searchBarDisplayController = _searchBarDisplayController;
+
// -----------------------------
#pragma mark - Init & Friends
@@ -32,7 +32,6 @@
@implementation TKTextViewCell
-@synthesize textView=_textView;
- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -61,7 +60,6 @@ - (void) setSelected:(BOOL)selected animated:(BOOL)animated {
}
- (void)setHighlighted:(BOOL)highlight animated:(BOOL)animated {
-
[super setHighlighted:highlight animated:animated];
if(highlight)
@@ -34,7 +34,6 @@
#import "NSArray+TKCategory.h"
@implementation TKViewController
-@synthesize loadingView = _loadingView;
- (void) viewDidUnload{
self.loadingView = nil;

0 comments on commit 72c847f

Please sign in to comment.