Permalink
Browse files

Xcode 4.5 freshness.

  • Loading branch information...
1 parent 3c442a1 commit c354ca1e5c118008a5201ee703d96c89c5ff705f @devinross committed Sep 28, 2012
@@ -10,6 +10,7 @@
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 20A42E06161594B400383954 /* launch_iphone-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 20A42E05161594B400383954 /* launch_iphone-568h@2x.png */; };
2860E328111B887F00E27156 /* AppDelegate_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = 2860E326111B887F00E27156 /* AppDelegate_iPhone.m */; };
2860E32E111B888700E27156 /* AppDelegate_iPad.m in Sources */ = {isa = PBXBuildFile; fileRef = 2860E32C111B888700E27156 /* AppDelegate_iPad.m */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
@@ -86,6 +87,7 @@
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* unviersaldemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = unviersaldemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 20A42E05161594B400383954 /* launch_iphone-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch_iphone-568h@2x.png"; path = "../../launch_iphone-568h@2x.png"; sourceTree = "<group>"; };
2860E325111B887F00E27156 /* AppDelegate_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPhone.h; sourceTree = "<group>"; };
2860E326111B887F00E27156 /* AppDelegate_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate_iPhone.m; sourceTree = "<group>"; };
2860E32B111B888700E27156 /* AppDelegate_iPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPad.h; sourceTree = "<group>"; };
@@ -277,6 +279,7 @@
3BF88B1711E544FF00C9FC43 /* Images */ = {
isa = PBXGroup;
children = (
+ 20A42E05161594B400383954 /* launch_iphone-568h@2x.png */,
3B30B21D129EE95B00466666 /* Back.png */,
3B30B21E129EE95B00466666 /* Back@2x.png */,
3BD32F20125CED5200BE5EAF /* beer.png */,
@@ -516,6 +519,7 @@
3B30B21F129EE95B00466666 /* Back.png in Resources */,
3B30B220129EE95B00466666 /* Back@2x.png in Resources */,
3B07B33C133AAE06001B1C6F /* TapkuLibrary.bundle in Resources */,
+ 20A42E06161594B400383954 /* launch_iphone-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -566,7 +570,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Demo_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_VERSION = "";
HEADER_SEARCH_PATHS = ../src;
INFOPLIST_FILE = "Demo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
@@ -588,7 +592,7 @@
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Demo_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_VERSION = "";
HEADER_SEARCH_PATHS = ../src;
INFOPLIST_FILE = "Demo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -768,7 +768,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TapkuLibrary_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_VERSION = "";
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
ONLY_ACTIVE_ARCH = NO;
@@ -790,7 +790,7 @@
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TapkuLibrary_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_VERSION = "";
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
ONLY_ACTIVE_ARCH = NO;
@@ -40,9 +40,9 @@
@interface TKCalendarMonthView : UIView {
TKCalendarMonthTiles *currentTile,*oldTile;
- UIButton *leftArrow, *rightArrow;
- UIImageView *topBackground, *shadow;
- UILabel *monthYear;
+ //UIButton *leftArrow, *rightArrow;
+ //UIImageView *topBackground, *shadow;
+ //UILabel *monthYear;
BOOL sunday;
}
@@ -50,9 +50,8 @@ @interface TKCalendarMonthTiles : UIView {
int selectedDay,selectedPortion;
int firstWeekday, daysInMonth;
- UILabel *dot;
- UILabel *currentDay;
- UIImageView *selectedImageView;
+
+
BOOL startOnSunday;
}
@@ -78,7 +77,7 @@ + (NSArray*) rangeOfDatesInMonthGrid:(NSDate*)date startOnSunday:(BOOL)sunday;
#pragma mark -
@implementation TKCalendarMonthTiles
-@synthesize monthDate,datesArray;
+
#define dotFontSize 18.0
#define dateFontSize 22.0
@@ -220,15 +219,15 @@ - (id) initWithMonth:(NSDate*)date marks:(NSArray*)markArray startDayOnSunday:(B
firstOfPrev = -1;
marks = markArray;
- monthDate = date;
+ _monthDate = date;
startOnSunday = sunday;
- TKDateInformation dateInfo = [monthDate dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
+ TKDateInformation dateInfo = [_monthDate dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
firstWeekday = dateInfo.weekday;
- NSDate *prev = [monthDate previousMonth];
- daysInMonth = [[monthDate nextMonth] daysBetweenDate:monthDate];
+ NSDate *prev = [_monthDate previousMonth];
+ daysInMonth = [[_monthDate nextMonth] daysBetweenDate:_monthDate];
NSArray *dates = [TKCalendarMonthTiles rangeOfDatesInMonthGrid:date startOnSunday:sunday];
@@ -241,7 +240,7 @@ - (id) initWithMonth:(NSDate*)date marks:(NSArray*)markArray startDayOnSunday:(B
TKDateInformation todayInfo = [[NSDate date] dateInformation];
today = dateInfo.month == todayInfo.month && dateInfo.year == todayInfo.year ? todayInfo.day : -5;
- int preDayCnt = [prev daysBetweenDate:monthDate];
+ int preDayCnt = [prev daysBetweenDate:_monthDate];
if(firstWeekday>1 && sunday){
firstOfPrev = preDayCnt - firstWeekday+2;
lastOfPrev = preDayCnt;
@@ -429,7 +428,7 @@ - (void) selectDay:(int)day{
- (NSDate*) dateSelected{
if(selectedDay < 1 || selectedPortion != 1) return nil;
- TKDateInformation info = [monthDate dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
+ TKDateInformation info = [_monthDate dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
info.hour = 0;
info.minute = 0;
info.second = 0;
@@ -540,46 +539,44 @@ - (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
}
- (UILabel *) currentDay{
- if(currentDay==nil){
+ if(_currentDay==nil){
CGRect r = self.selectedImageView.bounds;
r.origin.y -= 2;
- currentDay = [[UILabel alloc] initWithFrame:r];
- currentDay.text = @"1";
- currentDay.textColor = [UIColor whiteColor];
- currentDay.backgroundColor = [UIColor clearColor];
- currentDay.font = [UIFont boldSystemFontOfSize:dateFontSize];
- currentDay.textAlignment = UITextAlignmentCenter;
- currentDay.shadowColor = [UIColor darkGrayColor];
- currentDay.shadowOffset = CGSizeMake(0, -1);
+ _currentDay = [[UILabel alloc] initWithFrame:r];
+ _currentDay.text = @"1";
+ _currentDay.textColor = [UIColor whiteColor];
+ _currentDay.backgroundColor = [UIColor clearColor];
+ _currentDay.font = [UIFont boldSystemFontOfSize:dateFontSize];
+ _currentDay.textAlignment = UITextAlignmentCenter;
+ _currentDay.shadowColor = [UIColor darkGrayColor];
+ _currentDay.shadowOffset = CGSizeMake(0, -1);
}
- return currentDay;
+ return _currentDay;
}
- (UILabel *) dot{
- if(dot==nil){
+ if(_dot==nil){
CGRect r = self.selectedImageView.bounds;
r.origin.y += 29;
r.size.height -= 31;
- dot = [[UILabel alloc] initWithFrame:r];
-
- dot.text = @"";
- dot.textColor = [UIColor whiteColor];
- dot.backgroundColor = [UIColor clearColor];
- dot.font = [UIFont boldSystemFontOfSize:dotFontSize];
- dot.textAlignment = UITextAlignmentCenter;
- dot.shadowColor = [UIColor darkGrayColor];
- dot.shadowOffset = CGSizeMake(0, -1);
+ _dot = [[UILabel alloc] initWithFrame:r];
+ _dot.text = @"";
+ _dot.textColor = [UIColor whiteColor];
+ _dot.backgroundColor = [UIColor clearColor];
+ _dot.font = [UIFont boldSystemFontOfSize:dotFontSize];
+ _dot.textAlignment = UITextAlignmentCenter;
+ _dot.shadowColor = [UIColor darkGrayColor];
+ _dot.shadowOffset = CGSizeMake(0, -1);
}
- return dot;
+ return _dot;
}
- (UIImageView *) selectedImageView{
- if(selectedImageView==nil){
-
+ if(_selectedImageView==nil){
NSString *path = TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected.png");
UIImage *img = [[UIImage imageWithContentsOfFile:path] stretchableImageWithLeftCapWidth:1 topCapHeight:0];
- selectedImageView = [[UIImageView alloc] initWithImage:img];
- selectedImageView.frame = CGRectMake(0, 0, 47, 45);
+ _selectedImageView = [[UIImageView alloc] initWithImage:img];
+ _selectedImageView.frame = CGRectMake(0, 0, 47, 45);
}
- return selectedImageView;
+ return _selectedImageView;
}
@end
@@ -797,7 +794,7 @@ - (void) changeMonthAnimation:(UIView*)sender{
- monthYear.text = [localNextMonth monthYearString];
+ _monthYear.text = [localNextMonth monthYearString];
@@ -930,42 +927,42 @@ - (void) tile:(NSArray*)ar{
#pragma mark Properties
- (UIImageView *) topBackground{
- if(topBackground==nil){
- topBackground = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Grid Top Bar.png")]];
+ if(_topBackground==nil){
+ _topBackground = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Grid Top Bar.png")]];
}
- return topBackground;
+ return _topBackground;
}
- (UILabel *) monthYear{
- if(monthYear==nil){
- monthYear = [[UILabel alloc] initWithFrame:CGRectInset(CGRectMake(0, 0, self.tileBox.frame.size.width, 38), 40, 6)];
- monthYear.textAlignment = UITextAlignmentCenter;
- monthYear.backgroundColor = [UIColor clearColor];
- monthYear.font = [UIFont boldSystemFontOfSize:22];
- monthYear.textColor = [UIColor colorWithRed:59/255. green:73/255. blue:88/255. alpha:1];
+ if(_monthYear==nil){
+ _monthYear = [[UILabel alloc] initWithFrame:CGRectInset(CGRectMake(0, 0, self.tileBox.frame.size.width, 38), 40, 6)];
+ _monthYear.textAlignment = UITextAlignmentCenter;
+ _monthYear.backgroundColor = [UIColor clearColor];
+ _monthYear.font = [UIFont boldSystemFontOfSize:22];
+ _monthYear.textColor = [UIColor colorWithRed:59/255. green:73/255. blue:88/255. alpha:1];
}
- return monthYear;
+ return _monthYear;
}
- (UIButton *) leftArrow{
- if(leftArrow==nil){
- leftArrow = [UIButton buttonWithType:UIButtonTypeCustom];
- leftArrow.tag = 0;
- leftArrow.accessibilityLabel = @"Previous Month";
- [leftArrow addTarget:self action:@selector(changeMonth:) forControlEvents:UIControlEventTouchUpInside];
- [leftArrow setImage:[UIImage imageNamedTK:@"TapkuLibrary.bundle/Images/calendar/Month Calendar Left Arrow"] forState:0];
- leftArrow.frame = CGRectMake(0, 0, 48, 38);
+ if(_leftArrow==nil){
+ _leftArrow = [UIButton buttonWithType:UIButtonTypeCustom];
+ _leftArrow.tag = 0;
+ _leftArrow.accessibilityLabel = @"Previous Month";
+ [_leftArrow addTarget:self action:@selector(changeMonth:) forControlEvents:UIControlEventTouchUpInside];
+ [_leftArrow setImage:[UIImage imageNamedTK:@"TapkuLibrary.bundle/Images/calendar/Month Calendar Left Arrow"] forState:0];
+ _leftArrow.frame = CGRectMake(0, 0, 48, 38);
}
- return leftArrow;
+ return _leftArrow;
}
- (UIButton *) rightArrow{
- if(rightArrow==nil){
- rightArrow = [UIButton buttonWithType:UIButtonTypeCustom];
- rightArrow.tag = 1;
- rightArrow.accessibilityLabel = @"Next Month";
- [rightArrow addTarget:self action:@selector(changeMonth:) forControlEvents:UIControlEventTouchUpInside];
- rightArrow.frame = CGRectMake(320-45, 0, 48, 38);
- [rightArrow setImage:[UIImage imageNamedTK:@"TapkuLibrary.bundle/Images/calendar/Month Calendar Right Arrow"] forState:0];
+ if(_rightArrow==nil){
+ _rightArrow = [UIButton buttonWithType:UIButtonTypeCustom];
+ _rightArrow.tag = 1;
+ _rightArrow.accessibilityLabel = @"Next Month";
+ [_rightArrow addTarget:self action:@selector(changeMonth:) forControlEvents:UIControlEventTouchUpInside];
+ _rightArrow.frame = CGRectMake(320-45, 0, 48, 38);
+ [_rightArrow setImage:[UIImage imageNamedTK:@"TapkuLibrary.bundle/Images/calendar/Month Calendar Right Arrow"] forState:0];
}
- return rightArrow;
+ return _rightArrow;
}
- (UIView *) tileBox{
if(_tileBox==nil){
@@ -975,10 +972,10 @@ - (UIView *) tileBox{
return _tileBox;
}
- (UIImageView *) shadow{
- if(shadow==nil){
- shadow = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Shadow.png")]];
+ if(_shadow==nil){
+ _shadow = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Shadow.png")]];
}
- return shadow;
+ return _shadow;
}
@end
@@ -35,9 +35,7 @@
/**
`TKCoverflowCoverView` objects are the main views for displaying covers in `TKCoverflowView`.
*/
-@interface TKCoverflowCoverView : UIView {
- float baseline;
-}
+@interface TKCoverflowCoverView : UIView
- (id) initWithFrame:(CGRect)frame showReflection:(BOOL)reflection;
@@ -48,7 +46,7 @@
@property (strong,nonatomic) CAGradientLayer *gradientLayer;
/** The height of the image. This property will help coverflow adjust views to display images with different heights. */
-@property (assign,nonatomic) float baseline; // set this property for displaying images w/ different heights
+@property (assign,nonatomic) CGFloat baseline; // set this property for displaying images w/ different heights
@@ -33,12 +33,7 @@
#import "UIImage+TKCategory.h"
#import "TKGlobal.h"
-
-
-
@implementation TKCoverflowCoverView
-@synthesize baseline;
-
- (id) initWithFrame:(CGRect)frame showReflection:(BOOL)reflection{
if(!(self=[super initWithFrame:frame])) return nil;
@@ -67,22 +62,14 @@ - (id) initWithFrame:(CGRect)frame showReflection:(BOOL)reflection{
[self.layer addSublayer:self.gradientLayer];
}
-
-
-
-
return self;
}
-
-
- (id) initWithFrame:(CGRect)frame {
return [self initWithFrame:frame showReflection:YES];
}
-
- (void) setImage:(UIImage *)img{
-
if(img==nil){
[CATransaction begin];
[CATransaction setAnimationDuration:0.0f];
@@ -98,7 +85,6 @@ - (void) setImage:(UIImage *)img{
}
-
[CATransaction begin];
[CATransaction setAnimationDuration:0.0f];
@@ -108,7 +94,7 @@ - (void) setImage:(UIImage *)img{
CGFloat factor = self.bounds.size.width / (h>w?h:w);
h = factor * h;
w = factor * w;
- CGFloat y = baseline - h > 0 ? baseline - h : 0;
+ CGFloat y = _baseline - h > 0 ? _baseline - h : 0;
self.imageView.frame = CGRectMake(0, y, w, h);
self.imageView.image = image;
@@ -125,12 +111,6 @@ - (void) setImage:(UIImage *)img{
- (UIImage*) image{
return self.imageView.image;
}
-- (void) setBaseline:(float)f{
- baseline = f;
-}
-
-
-
-@end
+@end
Oops, something went wrong.

0 comments on commit c354ca1

Please sign in to comment.