diff --git a/Examples/Advanced iOS Demo/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Advanced iOS Demo/iCarouselExample.xcodeproj/project.pbxproj index deec061ed1..1e7bd6eb22 100644 --- a/Examples/Advanced iOS Demo/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Advanced iOS Demo/iCarouselExample.xcodeproj/project.pbxproj @@ -163,7 +163,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -292,7 +292,7 @@ GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; @@ -349,7 +349,7 @@ GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; diff --git a/Examples/Advanced iOS Demo/iCarouselExampleViewController.m b/Examples/Advanced iOS Demo/iCarouselExampleViewController.m index 1db532e4f8..feafc1e529 100644 --- a/Examples/Advanced iOS Demo/iCarouselExampleViewController.m +++ b/Examples/Advanced iOS Demo/iCarouselExampleViewController.m @@ -9,7 +9,9 @@ #import "iCarouselExampleViewController.h" -#pragma GCC diagnostic ignored "-Wgnu" +#pragma clang diagnostic ignored "-Wgnu" +#pragma clang diagnostic ignored "-Wconversion" +#pragma clang diagnostic ignored "-Wdouble-promotion" @interface iCarouselExampleViewController () @@ -79,20 +81,6 @@ - (void)viewDidLoad self.navItem.title = @"CoverFlow2"; } -- (void)viewDidUnload -{ - [super viewDidUnload]; - self.carousel = nil; - self.navItem = nil; - self.orientationBarItem = nil; - self.wrapBarItem = nil; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(__unused UIInterfaceOrientation)interfaceOrientation -{ - return YES; -} - - (IBAction)switchCarouselType { UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Select Carousel Type" @@ -173,12 +161,12 @@ - (UIView *)carousel:(__unused iCarousel *)carousel viewForItemAtIndex:(NSIntege //create new view if no view is available for recycling if (view == nil) { - view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200.0f, 200.0f)]; + view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200.0, 200.0)]; ((UIImageView *)view).image = [UIImage imageNamed:@"page.png"]; view.contentMode = UIViewContentModeCenter; label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 1; [view addSubview:label]; @@ -215,14 +203,14 @@ - (UIView *)carousel:(__unused iCarousel *)carousel placeholderViewAtIndex:(NSIn //don't do anything specific to the index within //this `if (view == nil) {...}` statement because the view will be //recycled and used with other index values later - view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200.0f, 200.0f)]; + view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200.0, 200.0)]; ((UIImageView *)view).image = [UIImage imageNamed:@"page.png"]; view.contentMode = UIViewContentModeCenter; label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; - label.font = [label.font fontWithSize:50.0f]; + label.textAlignment = NSTextAlignmentCenter; + label.font = [label.font fontWithSize:50.0]; label.tag = 1; [view addSubview:label]; } @@ -245,8 +233,8 @@ - (UIView *)carousel:(__unused iCarousel *)carousel placeholderViewAtIndex:(NSIn - (CATransform3D)carousel:(__unused iCarousel *)carousel itemTransformForOffset:(CGFloat)offset baseTransform:(CATransform3D)transform { //implement 'flip3D' style carousel - transform = CATransform3DRotate(transform, M_PI / 8.0f, 0.0f, 1.0f, 0.0f); - return CATransform3DTranslate(transform, 0.0f, 0.0f, offset * self.carousel.itemWidth); + transform = CATransform3DRotate(transform, M_PI / 8.0, 0.0, 1.0, 0.0); + return CATransform3DTranslate(transform, 0.0, 0.0, offset * self.carousel.itemWidth); } - (CGFloat)carousel:(__unused iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value @@ -262,14 +250,14 @@ - (CGFloat)carousel:(__unused iCarousel *)carousel valueForOption:(iCarouselOpti case iCarouselOptionSpacing: { //add a bit of spacing between the item views - return value * 1.05f; + return value * 1.05; } case iCarouselOptionFadeMax: { if (self.carousel.type == iCarouselTypeCustom) { //set opacity based on distance from camera - return 0.0f; + return 0.0; } return value; } diff --git a/Examples/Basic iOS Example/iCarouselExample-Info.plist b/Examples/Basic iOS Example/iCarouselExample-Info.plist index 0b63b2adc5..b60e949af0 100644 --- a/Examples/Basic iOS Example/iCarouselExample-Info.plist +++ b/Examples/Basic iOS Example/iCarouselExample-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,6 +28,8 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortraitUpsideDown @@ -35,7 +37,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Basic iOS Example/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Basic iOS Example/iCarouselExample.xcodeproj/project.pbxproj index 42ab9d46f5..cfa1ffa489 100644 --- a/Examples/Basic iOS Example/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Basic iOS Example/iCarouselExample.xcodeproj/project.pbxproj @@ -161,7 +161,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0510; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -241,6 +241,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -249,7 +250,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; @@ -265,7 +266,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; @@ -284,6 +285,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -301,6 +303,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Basic iOS Example/iCarouselExampleViewController.m b/Examples/Basic iOS Example/iCarouselExampleViewController.m index 1d70d95ba9..c6886f9a4d 100644 --- a/Examples/Basic iOS Example/iCarouselExampleViewController.m +++ b/Examples/Basic iOS Example/iCarouselExampleViewController.m @@ -20,6 +20,8 @@ @implementation iCarouselExampleViewController - (void)awakeFromNib { + [super awakeFromNib]; + //set up data //your carousel should always be driven by an array of //data of some kind - don't store data in your item views diff --git a/Examples/Buttons Demo/iCarouselButtonsDemo-Info.plist b/Examples/Buttons Demo/iCarouselButtonsDemo-Info.plist index 58f4485124..0284a6bf38 100644 --- a/Examples/Buttons Demo/iCarouselButtonsDemo-Info.plist +++ b/Examples/Buttons Demo/iCarouselButtonsDemo-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/project.pbxproj b/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/project.pbxproj index db77055652..c293d31913 100644 --- a/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/project.pbxproj +++ b/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/project.pbxproj @@ -162,7 +162,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselButtonsDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -242,6 +242,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -249,7 +250,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -263,7 +264,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -281,6 +282,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselButtonsDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselButtonsDemo; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -298,6 +300,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselButtonsDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselButtonsDemo; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselButtonsDemo.xcscheme b/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselButtonsDemo.xcscheme index 80fafb420d..6c382e9e7d 100644 --- a/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselButtonsDemo.xcscheme +++ b/Examples/Buttons Demo/iCarouselButtonsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselButtonsDemo.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:iCarouselButtonsDemo.xcodeproj"> + + - + - + -#import - -//#ifdef NSCoreDataVersionNumber10_5 -@protocol NSFetchedResultsControllerDelegate; - -@class NSFetchRequest; -@class NSManagedObjectContext; - - -@interface NSFetchedResultsController : NSObject { - __unsafe_unretained id _delegate; - NSFetchRequest *_fetchRequest; - NSManagedObjectContext *_managedObjectContext; - NSArray *_fetchedObjects; // we don't yet support sections! - - // stubs - NSString *_sectionNameKeyPath; - NSString *_sectionNameKey; - NSString *_cacheName; -} - -- (id)initWithFetchRequest:(NSFetchRequest *)fetchRequest managedObjectContext: (NSManagedObjectContext *)context sectionNameKeyPath:(NSString *)sectionNameKeyPath cacheName:(NSString *)name; - -- (BOOL)performFetch:(NSError **)error; - -@property (nonatomic, readonly) NSFetchRequest *fetchRequest; -@property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext; -@property (nonatomic, readonly) NSString *sectionNameKeyPath; -@property (nonatomic, readonly) NSString *cacheName; -@property(nonatomic, assign) id delegate; -+ (void)deleteCacheWithName:(NSString *)name; - -// accessing objects -@property (nonatomic, readonly) NSArray *fetchedObjects; -- (id)objectAtIndexPath:(NSIndexPath *)indexPath; -- (NSIndexPath *)indexPathForObject:(id)object; - -- (NSString *)sectionIndexTitleForSectionName:(NSString *)sectionName; -@property (nonatomic, readonly) NSArray *sectionIndexTitles; -@property (nonatomic, readonly) NSArray *sections; -- (NSInteger)sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)sectionIndex; - -@end - - -@protocol NSFetchedResultsSectionInfo - -@property (nonatomic, readonly) NSString *name; -@property (nonatomic, readonly) NSString *indexTitle; -@property (nonatomic, readonly) NSUInteger numberOfObjects; -@property (nonatomic, readonly) NSArray *objects; - -@end - -@protocol NSFetchedResultsControllerDelegate - -enum { - NSFetchedResultsChangeInsert = 1, - NSFetchedResultsChangeDelete = 2, - NSFetchedResultsChangeMove = 3, - NSFetchedResultsChangeUpdate = 4 - -}; -typedef NSUInteger NSFetchedResultsChangeType; - -@optional - -- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath; - -- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id )sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type; - -- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller; -- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller; - -- (NSString *)controller:(NSFetchedResultsController *)controller sectionIndexTitleForSectionName:(NSString *)sectionName; - -@end - -//#endif diff --git a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/NSFetchedResultsController.m b/Examples/Chameleon Demo/Chameleon/UIKit/Classes/NSFetchedResultsController.m deleted file mode 100755 index 7ceaa3ff96..0000000000 --- a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/NSFetchedResultsController.m +++ /dev/null @@ -1,109 +0,0 @@ -// -// NSFetchedResultsController.m -// UIKit -// -// Created by Peter Steinberger on 23.03.11. -// -/* - * Copyright (c) 2011, The Iconfactory. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of The Iconfactory nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE ICONFACTORY BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "NSFetchedResultsController.h" - -//#ifdef NSCoreDataVersionNumber10_5 - -#import "NSIndexPath+UITableView.h" - -@implementation NSFetchedResultsController - -@synthesize delegate = _delegate; -@synthesize fetchRequest = _fetchRequest; -@synthesize managedObjectContext = _managedObjectContext; -@synthesize fetchedObjects = _fetchedObjects; -@synthesize cacheName = _cacheName, sectionNameKeyPath = _sectionNameKeyPath; - -- (id)initWithFetchRequest:(NSFetchRequest *)fetchRequest managedObjectContext: (NSManagedObjectContext *)context sectionNameKeyPath:(NSString *)sectionNameKeyPath cacheName:(NSString *)name { - if ((self = [super init])) { - _fetchRequest = [fetchRequest retain]; - _managedObjectContext = [context retain]; - } - return self; -} - -- (void)dealloc { - _delegate = nil; - [_fetchRequest release]; - [_managedObjectContext release]; - [_fetchedObjects release]; - [super dealloc]; -} - -- (BOOL)performFetch:(NSError **)error { - [_fetchedObjects release]; - _fetchedObjects = [[_managedObjectContext executeFetchRequest:_fetchRequest error:error] retain]; - - return YES; -} - -- (id)objectAtIndexPath:(NSIndexPath *)indexPath { - return [_fetchedObjects objectAtIndex:indexPath.row]; -} - -- (NSIndexPath *)indexPathForObject:(id)object { - NSUInteger objectIndex = [_fetchedObjects indexOfObject:object]; - return [NSIndexPath indexPathForRow:objectIndex inSection:0]; -} - -// stubs - -+ (void)deleteCacheWithName:(NSString *)name { - // stub -} - - -- (NSString *)sectionIndexTitleForSectionName:(NSString *)sectionName { - return @"UNIMPLEMENTED"; -} - -- (NSArray *)sectionIndexTitles { - // stub - return [NSArray array]; -} - -- (NSArray *)sections { - // stub - return [NSArray array]; -} - -- (NSInteger)sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)sectionIndex { - return 0; -} - -@end - -//#endif diff --git a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIAppearanceProxy.m b/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIAppearanceProxy.m index 2bbfc74f2a..ad016c5a08 100755 --- a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIAppearanceProxy.m +++ b/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIAppearanceProxy.m @@ -143,73 +143,10 @@ static void DidSetPropertyWithAxisValues(id self, SEL cmd, NSInteger numberOfAxi [self _appearancePropertyDidChange:[[[UIAppearanceProperty alloc] initWithSelector:cmd axisValues:values] autorelease]]; } -// this evil macro is used to generate type-specific setter overrides -// it currently only supports up to 4 axis values. if more are needed, just add more cases here following the pattern. easy! -#define UIAppearanceSetterOverride(TYPE) \ -static void UIAppearanceSetterOverride_##TYPE(id self, SEL cmd, TYPE property, ...) { \ - IMP imp = GetOriginalMethodIMP(self, cmd); \ - const NSInteger numberOfAxisValues = [[self methodSignatureForSelector:cmd] numberOfArguments] - 3; \ - if (imp && numberOfAxisValues >= 0) { \ - va_list args; va_start(args, property); \ - NSInteger axisValues[numberOfAxisValues]; \ - if (numberOfAxisValues == 0) { \ - imp(self, cmd, property); \ - } else if (numberOfAxisValues == 1) { \ - axisValues[0]=va_arg(args, NSInteger); \ - imp(self, cmd, property, axisValues[0]); \ - } else if (numberOfAxisValues == 2) { \ - axisValues[0]=va_arg(args, NSInteger); axisValues[1]=va_arg(args, NSInteger); \ - imp(self, cmd, property, axisValues[0], axisValues[1]); \ - } else if (numberOfAxisValues == 3) { \ - axisValues[0]=va_arg(args, NSInteger); axisValues[1]=va_arg(args, NSInteger); axisValues[2]=va_arg(args, NSInteger); \ - imp(self, cmd, property, axisValues[0], axisValues[1], axisValues[2]); \ - } else if (numberOfAxisValues == 4) { \ - axisValues[0]=va_arg(args, NSInteger); axisValues[1]=va_arg(args, NSInteger); axisValues[2]=va_arg(args, NSInteger); axisValues[3]=va_arg(args, NSInteger); \ - imp(self, cmd, property, axisValues[0], axisValues[1], axisValues[2], axisValues[3]); \ - } else { \ - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"argument count mismatch" userInfo:nil]; \ - } \ - DidSetPropertyWithAxisValues(self, cmd, numberOfAxisValues, axisValues); \ - va_end(args); \ - } else { \ - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"something terrible has happened" userInfo:nil]; \ - } \ -} - -// curse you, static language! -UIAppearanceSetterOverride(NSInteger) -UIAppearanceSetterOverride(NSUInteger) -UIAppearanceSetterOverride(id) -UIAppearanceSetterOverride(CGFloat) -UIAppearanceSetterOverride(CGPoint) -UIAppearanceSetterOverride(CGSize) -UIAppearanceSetterOverride(CGRect) -UIAppearanceSetterOverride(UIEdgeInsets) -UIAppearanceSetterOverride(UIOffset) - static IMP ImplementationForPropertyType(const char *t) { - if (TypeIsSignedInteger(t)) { - return (IMP)UIAppearanceSetterOverride_NSInteger; - } else if (TypeIsUnsignedInteger(t)) { - return (IMP)UIAppearanceSetterOverride_NSUInteger; - } else if (TypeIsObject(t)) { - return (IMP)UIAppearanceSetterOverride_id; - } else if (TypeIsCGFloat(t)) { - return (IMP)UIAppearanceSetterOverride_CGFloat; - } else if (TypeIsCGPoint(t)) { - return (IMP)UIAppearanceSetterOverride_CGPoint; - } else if (TypeIsCGSize(t)) { - return (IMP)UIAppearanceSetterOverride_CGSize; - } else if (TypeIsCGRect(t)) { - return (IMP)UIAppearanceSetterOverride_CGRect; - } else if (TypeIsUIEdgeInsets(t)) { - return (IMP)UIAppearanceSetterOverride_UIEdgeInsets; - } else if (TypeIsUIOffset(t)) { - return (IMP)UIAppearanceSetterOverride_UIOffset; - } else { - @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"no setter implementation for property type" userInfo:nil]; - } + @throw [NSException exceptionWithName:NSInternalInconsistencyException + reason:@"no setter implementation for property type" userInfo:nil]; } @implementation UIAppearanceProxy diff --git a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIKit.h b/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIKit.h index 24ab4f3695..e1bae6dafc 100755 --- a/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIKit.h +++ b/Examples/Chameleon Demo/Chameleon/UIKit/Classes/UIKit.h @@ -113,8 +113,5 @@ #import "UIKey.h" #import "UIScrollWheelGestureRecognizer.h" -// only add if core data is included on 10.6 -#import "NSFetchedResultsController.h" - // SystemConfiguration-Helper #define kSCNetworkReachabilityFlagsIsWWAN kSCNetworkReachabilityFlagsConnectionOnDemand diff --git a/Examples/Chameleon Demo/Chameleon/UIKit/UIKit.xcodeproj/project.pbxproj b/Examples/Chameleon Demo/Chameleon/UIKit/UIKit.xcodeproj/project.pbxproj index e5004da744..8092a3ecf8 100755 --- a/Examples/Chameleon Demo/Chameleon/UIKit/UIKit.xcodeproj/project.pbxproj +++ b/Examples/Chameleon Demo/Chameleon/UIKit/UIKit.xcodeproj/project.pbxproj @@ -282,8 +282,6 @@ 7011107D133BE0F400C86512 /* UIDatePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 7011107B133BE0F300C86512 /* UIDatePicker.m */; }; 7806ED2A133A1D7500273BC6 /* UITabBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 7806ED28133A1D7500273BC6 /* UITabBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7806ED2B133A1D7500273BC6 /* UITabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 7806ED29133A1D7500273BC6 /* UITabBar.m */; }; - 789CF898133A3CD500250AB4 /* NSFetchedResultsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 789CF896133A3CD500250AB4 /* NSFetchedResultsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 789CF899133A3CD500250AB4 /* NSFetchedResultsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 789CF897133A3CD500250AB4 /* NSFetchedResultsController.m */; }; 78CB48AC133A9C51008636DA /* UISearchBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 78CB48AA133A9C51008636DA /* UISearchBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; 78CB48AD133A9C51008636DA /* UISearchBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 78CB48AB133A9C51008636DA /* UISearchBar.m */; }; 78CB48B0133AA536008636DA /* UITabBarItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 78CB48AE133AA535008636DA /* UITabBarItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -983,7 +981,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 789CF898133A3CD500250AB4 /* NSFetchedResultsController.h in Headers */, 78CB48D9133AB922008636DA /* UISlider.h in Headers */, 78CB48B4133AA8AF008636DA /* UISegmentedControl.h in Headers */, 14CC840611EFA8AF005988CC /* UIRoundedRectButton.h in Headers */, @@ -1155,7 +1152,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "UIKit" */; compatibilityVersion = "Xcode 3.2"; @@ -1224,7 +1221,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 789CF899133A3CD500250AB4 /* NSFetchedResultsController.m in Sources */, 78CB48B1133AA536008636DA /* UITabBarItem.m in Sources */, 78CB48AD133A9C51008636DA /* UISearchBar.m in Sources */, 14CC840711EFA8AF005988CC /* UIRoundedRectButton.m in Sources */, @@ -1369,6 +1365,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1390,11 +1387,27 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; @@ -1405,10 +1418,26 @@ 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; PROVISIONING_PROFILE = ""; diff --git a/Examples/Chameleon Demo/iCarouselChameleonDemo.xcodeproj/project.pbxproj b/Examples/Chameleon Demo/iCarouselChameleonDemo.xcodeproj/project.pbxproj index e92ae86b1d..3fbe02a38b 100644 --- a/Examples/Chameleon Demo/iCarouselChameleonDemo.xcodeproj/project.pbxproj +++ b/Examples/Chameleon Demo/iCarouselChameleonDemo.xcodeproj/project.pbxproj @@ -215,7 +215,7 @@ 0153202E14A71EFF00C4A088 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; }; buildConfigurationList = 0153203114A71EFF00C4A088 /* Build configuration list for PBXProject "iCarouselChameleonDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -321,11 +321,14 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -359,11 +362,14 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; diff --git a/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/project.pbxproj index b7899bd1ce..46d28e36c2 100644 --- a/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/project.pbxproj @@ -182,7 +182,7 @@ 01FA10B4145E994F001906CB /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01FA10B7145E994F001906CB /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -261,14 +261,18 @@ CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -283,7 +287,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -297,13 +301,16 @@ CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -312,7 +319,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -326,6 +333,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "iCarouselExample/iCarouselExample-Prefix.pch"; INFOPLIST_FILE = "iCarouselExample/iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -339,6 +347,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "iCarouselExample/iCarouselExample-Prefix.pch"; INFOPLIST_FILE = "iCarouselExample/iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; diff --git a/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/xcshareddata/xcschemes/iCarouselExample.xcscheme b/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/xcshareddata/xcschemes/iCarouselExample.xcscheme index 6dee239ef1..681a10cd27 100644 --- a/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/xcshareddata/xcschemes/iCarouselExample.xcscheme +++ b/Examples/Dynamic Image Effects/iCarouselExample.xcodeproj/xcshareddata/xcschemes/iCarouselExample.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:iCarouselExample.xcodeproj"> + + - + - + CFBundleIconFiles CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/Dynamic View Reflections/iCarouselExampleAppDelegate.m b/Examples/Dynamic View Reflections/iCarouselExampleAppDelegate.m index f2a333aecd..ceb48f9fb9 100644 --- a/Examples/Dynamic View Reflections/iCarouselExampleAppDelegate.m +++ b/Examples/Dynamic View Reflections/iCarouselExampleAppDelegate.m @@ -16,7 +16,7 @@ @implementation iCarouselExampleAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [window addSubview:viewController.view]; + window.rootViewController = viewController; [window makeKeyAndVisible]; return YES; } diff --git a/Examples/Dynamic View Reflections/iCarouselExampleViewController.m b/Examples/Dynamic View Reflections/iCarouselExampleViewController.m index 6925e86576..0662ad374a 100644 --- a/Examples/Dynamic View Reflections/iCarouselExampleViewController.m +++ b/Examples/Dynamic View Reflections/iCarouselExampleViewController.m @@ -70,7 +70,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r label.layer.borderColor = [UIColor whiteColor].CGColor; label.layer.borderWidth = 4.0f; label.layer.cornerRadius = 8.0f; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 9999; [view addSubview:label]; diff --git a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo-Info.plist b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo-Info.plist index 58f4485124..0284a6bf38 100644 --- a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo-Info.plist +++ b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/project.pbxproj b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/project.pbxproj index 2f5dc6d638..60c0e68f56 100644 --- a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/project.pbxproj +++ b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/project.pbxproj @@ -176,7 +176,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselReflectionsDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -258,6 +258,7 @@ buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -265,7 +266,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -280,7 +281,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -298,6 +299,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselReflectionsDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselReflectionsDemo; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -315,6 +317,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselReflectionsDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselReflectionsDemo; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselReflectionsDemo.xcscheme b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselReflectionsDemo.xcscheme index cf1c0b2b69..638d1c16f7 100644 --- a/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselReflectionsDemo.xcscheme +++ b/Examples/Dynamic View Reflections/iCarouselReflectionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselReflectionsDemo.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:iCarouselReflectionsDemo.xcodeproj"> + + - + - + CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Fading Demo/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Fading Demo/iCarouselExample.xcodeproj/project.pbxproj index 19cb0ab4eb..dacb63ce5f 100644 --- a/Examples/Fading Demo/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Fading Demo/iCarouselExample.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -237,6 +237,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -244,7 +245,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -258,7 +259,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -276,6 +277,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = 2; WRAPPER_EXTENSION = app; @@ -293,6 +295,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = 2; VALIDATE_PRODUCT = YES; diff --git a/Examples/Fading Demo/iCarouselExampleAppDelegate.m b/Examples/Fading Demo/iCarouselExampleAppDelegate.m index f2a333aecd..ceb48f9fb9 100644 --- a/Examples/Fading Demo/iCarouselExampleAppDelegate.m +++ b/Examples/Fading Demo/iCarouselExampleAppDelegate.m @@ -16,7 +16,7 @@ @implementation iCarouselExampleAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [window addSubview:viewController.view]; + window.rootViewController = viewController; [window makeKeyAndVisible]; return YES; } diff --git a/Examples/Fading Demo/iCarouselExampleViewController.m b/Examples/Fading Demo/iCarouselExampleViewController.m index d92ac40063..2e2f17123d 100644 --- a/Examples/Fading Demo/iCarouselExampleViewController.m +++ b/Examples/Fading Demo/iCarouselExampleViewController.m @@ -23,6 +23,8 @@ @implementation iCarouselExampleViewController - (void)awakeFromNib { + [super awakeFromNib]; + //set up data //your carousel should always be driven by an array of //data of some kind - don't store data in your item views diff --git a/Examples/Mac Demo/iCarouselMac.xcodeproj/project.pbxproj b/Examples/Mac Demo/iCarouselMac.xcodeproj/project.pbxproj index 075118d173..608c5cbcb6 100644 --- a/Examples/Mac Demo/iCarouselMac.xcodeproj/project.pbxproj +++ b/Examples/Mac Demo/iCarouselMac.xcodeproj/project.pbxproj @@ -166,7 +166,7 @@ 018BBC5B13A37041005CA505 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; }; buildConfigurationList = 018BBC5E13A37041005CA505 /* Build configuration list for PBXProject "iCarouselMac" */; compatibilityVersion = "Xcode 3.2"; @@ -253,6 +253,7 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; @@ -261,6 +262,7 @@ CLANG_WARN_OBJC_RECEIVER_WEAK = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; @@ -316,6 +318,7 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; @@ -324,6 +327,7 @@ CLANG_WARN_OBJC_RECEIVER_WEAK = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; diff --git a/Examples/Mac Demo/iCarouselMac.xcodeproj/xcshareddata/xcschemes/iCarouselMac.xcscheme b/Examples/Mac Demo/iCarouselMac.xcodeproj/xcshareddata/xcschemes/iCarouselMac.xcscheme index 210a70aa1e..3e35d337de 100644 --- a/Examples/Mac Demo/iCarouselMac.xcodeproj/xcshareddata/xcschemes/iCarouselMac.xcscheme +++ b/Examples/Mac Demo/iCarouselMac.xcodeproj/xcshareddata/xcschemes/iCarouselMac.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -42,11 +42,11 @@ diff --git a/Examples/Mac Demo/iCarouselMac/iCarouselWindowController.m b/Examples/Mac Demo/iCarouselMac/iCarouselWindowController.m index e0b20e6dff..6c0a92b6fa 100644 --- a/Examples/Mac Demo/iCarouselMac/iCarouselWindowController.m +++ b/Examples/Mac Demo/iCarouselMac/iCarouselWindowController.m @@ -189,14 +189,14 @@ - (CGFloat)carouselItemWidth:(__unused iCarousel *)carousel { //set correct view size //because the background image on the views makes them too large - return 200.0f; + return 200.0; } - (CATransform3D)carousel:(__unused iCarousel *)_carousel itemTransformForOffset:(CGFloat)offset baseTransform:(CATransform3D)transform { //implement 'flip3D' style carousel - transform = CATransform3DRotate(transform, M_PI / 8.0f, 0.0f, 1.0f, 0.0f); - return CATransform3DTranslate(transform, 0.0f, 0.0f, offset * self.carousel.itemWidth); + transform = CATransform3DRotate(transform, M_PI / 8.0, 0.0, 1.0, 0.0); + return CATransform3DTranslate(transform, 0.0, 0.0, offset * self.carousel.itemWidth); } - (CGFloat)carousel:(__unused iCarousel *)_carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value @@ -213,14 +213,14 @@ - (CGFloat)carousel:(__unused iCarousel *)_carousel valueForOption:(iCarouselOpt { //reduce item spacing to compensate //for drop shadow and reflection around views - return value * 1.05f; + return value * 1.05; } case iCarouselOptionFadeMax: { if (self.carousel.type == iCarouselTypeCustom) { //set opacity based on distance from camera - return 0.0f; + return 0.0; } return value; } diff --git a/Examples/Multiple Carousels/MultipleCarousels-Info.plist b/Examples/Multiple Carousels/MultipleCarousels-Info.plist index 58f4485124..0284a6bf38 100644 --- a/Examples/Multiple Carousels/MultipleCarousels-Info.plist +++ b/Examples/Multiple Carousels/MultipleCarousels-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/project.pbxproj b/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/project.pbxproj index fd2e4c6c04..a95c4eb8bc 100644 --- a/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/project.pbxproj +++ b/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/project.pbxproj @@ -161,7 +161,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "MultipleCarousels" */; compatibilityVersion = "Xcode 3.2"; @@ -241,6 +241,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -248,7 +249,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -262,7 +263,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -280,6 +281,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "MultipleCarousels-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = MultipleCarousels; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -297,6 +299,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "MultipleCarousels-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = MultipleCarousels; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/xcshareddata/xcschemes/MultipleCarousels.xcscheme b/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/xcshareddata/xcschemes/MultipleCarousels.xcscheme index 29d4eadf7a..355f9fa75e 100644 --- a/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/xcshareddata/xcschemes/MultipleCarousels.xcscheme +++ b/Examples/Multiple Carousels/MultipleCarousels.xcodeproj/xcshareddata/xcschemes/MultipleCarousels.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:MultipleCarousels.xcodeproj"> + + - + - + CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Nested Carousels/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Nested Carousels/iCarouselExample.xcodeproj/project.pbxproj index 19cb0ab4eb..dacb63ce5f 100644 --- a/Examples/Nested Carousels/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Nested Carousels/iCarouselExample.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -237,6 +237,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -244,7 +245,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -258,7 +259,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -276,6 +277,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = 2; WRAPPER_EXTENSION = app; @@ -293,6 +295,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = 2; VALIDATE_PRODUCT = YES; diff --git a/Examples/Nested Carousels/iCarouselExampleViewController.m b/Examples/Nested Carousels/iCarouselExampleViewController.m index b36658267b..f19734eebc 100644 --- a/Examples/Nested Carousels/iCarouselExampleViewController.m +++ b/Examples/Nested Carousels/iCarouselExampleViewController.m @@ -161,7 +161,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 1; [view addSubview:label]; diff --git a/Examples/No Nib Demo/iCarouselExampleViewController.m b/Examples/No Nib Demo/iCarouselExampleViewController.m index 8bd67ceaa7..b8670947e2 100644 --- a/Examples/No Nib Demo/iCarouselExampleViewController.m +++ b/Examples/No Nib Demo/iCarouselExampleViewController.m @@ -73,17 +73,17 @@ - (void)viewDidLoad UINavigationBar *navbar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 44)]; navbar.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.navItem = [[UINavigationItem alloc] initWithTitle:@"Coverflow2"]; - _navItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Switch Type" style:UIBarButtonItemStyleBordered target:self action:@selector(switchCarouselType)]; - _navItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Wrap: ON" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleWrap)]; + _navItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Switch Type" style:UIBarButtonItemStylePlain target:self action:@selector(switchCarouselType)]; + _navItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Wrap: ON" style:UIBarButtonItemStylePlain target:self action:@selector(toggleWrap)]; [navbar setItems:@[_navItem]]; [self.view addSubview:navbar]; //add bottom bar UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 44, self.view.bounds.size.width, 44)]; toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; - [toolbar setItems:@[[[UIBarButtonItem alloc] initWithTitle:@"Insert Item" style:UIBarButtonItemStyleBordered target:self action:@selector(insertItem)], + [toolbar setItems:@[[[UIBarButtonItem alloc] initWithTitle:@"Insert Item" style:UIBarButtonItemStylePlain target:self action:@selector(insertItem)], [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:NULL], - [[UIBarButtonItem alloc] initWithTitle:@"Delete Item" style:UIBarButtonItemStyleBordered target:self action:@selector(removeItem)]]]; + [[UIBarButtonItem alloc] initWithTitle:@"Delete Item" style:UIBarButtonItemStylePlain target:self action:@selector(removeItem)]]]; [self.view addSubview:toolbar]; } @@ -173,7 +173,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r view.contentMode = UIViewContentModeCenter; label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 1; [view addSubview:label]; diff --git a/Examples/No Nib Demo/iCarouselNoNibDemo-Info.plist b/Examples/No Nib Demo/iCarouselNoNibDemo-Info.plist index 284970f458..de4b9604d1 100644 --- a/Examples/No Nib Demo/iCarouselNoNibDemo-Info.plist +++ b/Examples/No Nib Demo/iCarouselNoNibDemo-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -26,13 +26,13 @@ 1.0 LSRequiresIPhoneOS + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/project.pbxproj b/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/project.pbxproj index f370327101..4fabf5c008 100644 --- a/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/project.pbxproj +++ b/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/project.pbxproj @@ -157,7 +157,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselNoNibDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -219,6 +219,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -226,7 +227,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -240,7 +241,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -258,6 +259,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselNoNibDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselNoNibDemo; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -275,6 +277,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselNoNibDemo-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselNoNibDemo; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/xcshareddata/xcschemes/iCarouselNoNibDemo.xcscheme b/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/xcshareddata/xcschemes/iCarouselNoNibDemo.xcscheme index 040eaac840..9bcca3ddcb 100644 --- a/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/xcshareddata/xcschemes/iCarouselNoNibDemo.xcscheme +++ b/Examples/No Nib Demo/iCarouselNoNibDemo.xcodeproj/xcshareddata/xcschemes/iCarouselNoNibDemo.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:iCarouselNoNibDemo.xcodeproj"> + + - + - + CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Offsets Demo/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Offsets Demo/iCarouselExample.xcodeproj/project.pbxproj index cb11efffd4..7e802d2d31 100644 --- a/Examples/Offsets Demo/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Offsets Demo/iCarouselExample.xcodeproj/project.pbxproj @@ -161,7 +161,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -241,6 +241,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -248,7 +249,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -262,7 +263,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -280,6 +281,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -297,6 +299,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Offsets Demo/iCarouselExampleAppDelegate.m b/Examples/Offsets Demo/iCarouselExampleAppDelegate.m index f2a333aecd..ceb48f9fb9 100644 --- a/Examples/Offsets Demo/iCarouselExampleAppDelegate.m +++ b/Examples/Offsets Demo/iCarouselExampleAppDelegate.m @@ -16,7 +16,7 @@ @implementation iCarouselExampleAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [window addSubview:viewController.view]; + window.rootViewController = viewController; [window makeKeyAndVisible]; return YES; } diff --git a/Examples/Offsets Demo/iCarouselExampleViewController.m b/Examples/Offsets Demo/iCarouselExampleViewController.m index 9f6e5bf100..6bf0d074b6 100644 --- a/Examples/Offsets Demo/iCarouselExampleViewController.m +++ b/Examples/Offsets Demo/iCarouselExampleViewController.m @@ -111,7 +111,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r view.contentMode = UIViewContentModeCenter; label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 1; [view addSubview:label]; diff --git a/Examples/Options Demo/iCarouselExample-Info.plist b/Examples/Options Demo/iCarouselExample-Info.plist index 58f4485124..0284a6bf38 100644 --- a/Examples/Options Demo/iCarouselExample-Info.plist +++ b/Examples/Options Demo/iCarouselExample-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Options Demo/iCarouselExampleViewController.m b/Examples/Options Demo/iCarouselExampleViewController.m index c9cde8fa10..f3199171a4 100644 --- a/Examples/Options Demo/iCarouselExampleViewController.m +++ b/Examples/Options Demo/iCarouselExampleViewController.m @@ -214,7 +214,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r view.contentMode = UIViewContentModeCenter; label = [[UILabel alloc] initWithFrame:view.bounds]; label.backgroundColor = [UIColor clearColor]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.font = [label.font fontWithSize:50]; label.tag = 1; [view addSubview:label]; diff --git a/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/project.pbxproj b/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/project.pbxproj index d3c21c8feb..c2c8d08e64 100644 --- a/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/project.pbxproj +++ b/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/project.pbxproj @@ -161,7 +161,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselOptionsDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -241,6 +241,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -248,7 +249,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -262,7 +263,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -280,6 +281,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselOptionsDemo; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -297,6 +299,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselOptionsDemo; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselOptionsDemo.xcscheme b/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselOptionsDemo.xcscheme index 367c024158..672d7ed55b 100644 --- a/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselOptionsDemo.xcscheme +++ b/Examples/Options Demo/iCarouselOptionsDemo.xcodeproj/xcshareddata/xcschemes/iCarouselOptionsDemo.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,17 +38,21 @@ ReferencedContainer = "container:iCarouselOptionsDemo.xcodeproj"> + + - + - + CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,6 +28,8 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortraitUpsideDown @@ -35,7 +37,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Paging Example/iCarouselExample.xcodeproj/project.pbxproj b/Examples/Paging Example/iCarouselExample.xcodeproj/project.pbxproj index fa7dd962b2..a1e5e7b960 100644 --- a/Examples/Paging Example/iCarouselExample.xcodeproj/project.pbxproj +++ b/Examples/Paging Example/iCarouselExample.xcodeproj/project.pbxproj @@ -147,7 +147,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */; compatibilityVersion = "Xcode 3.2"; @@ -225,6 +225,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -233,7 +234,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; @@ -249,7 +250,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; @@ -268,6 +269,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -285,6 +287,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "iCarouselExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselExample; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/Examples/Paging Example/iCarouselExampleViewController.m b/Examples/Paging Example/iCarouselExampleViewController.m index 2424ba2c2b..c19156885f 100644 --- a/Examples/Paging Example/iCarouselExampleViewController.m +++ b/Examples/Paging Example/iCarouselExampleViewController.m @@ -20,6 +20,8 @@ @implementation iCarouselExampleViewController - (void)awakeFromNib { + [super awakeFromNib]; + //set up data //your carousel should always be driven by an array of //data of some kind - don't store data in your item views diff --git a/Examples/Storyboard Demo/StoryboardExample.xcodeproj/project.pbxproj b/Examples/Storyboard Demo/StoryboardExample.xcodeproj/project.pbxproj index b36729bf71..4ebf248eaa 100644 --- a/Examples/Storyboard Demo/StoryboardExample.xcodeproj/project.pbxproj +++ b/Examples/Storyboard Demo/StoryboardExample.xcodeproj/project.pbxproj @@ -160,7 +160,7 @@ B2E56E4E158250730090ECAC /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = B2E56E51158250730090ECAC /* Build configuration list for PBXProject "StoryboardExample" */; compatibilityVersion = "Xcode 3.2"; @@ -237,14 +237,18 @@ CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -258,7 +262,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -273,13 +277,16 @@ CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -287,7 +294,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -301,6 +308,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "StoryboardExample/StoryboardExample-Prefix.pch"; INFOPLIST_FILE = "StoryboardExample/StoryboardExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoalDesign.StoryboardExample.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -314,6 +322,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "StoryboardExample/StoryboardExample-Prefix.pch"; INFOPLIST_FILE = "StoryboardExample/StoryboardExample-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoalDesign.StoryboardExample.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; diff --git a/Examples/Storyboard Demo/StoryboardExample/StoryboardExample-Info.plist b/Examples/Storyboard Demo/StoryboardExample/StoryboardExample-Info.plist index 9b850338b5..8a34c1e729 100644 --- a/Examples/Storyboard Demo/StoryboardExample/StoryboardExample-Info.plist +++ b/Examples/Storyboard Demo/StoryboardExample/StoryboardExample-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.charcoalDesign.StoryboardExample.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Examples/Storyboard Demo/StoryboardExample/ViewController.m b/Examples/Storyboard Demo/StoryboardExample/ViewController.m index 9af81fd399..87eaab7b90 100644 --- a/Examples/Storyboard Demo/StoryboardExample/ViewController.m +++ b/Examples/Storyboard Demo/StoryboardExample/ViewController.m @@ -22,6 +22,8 @@ @implementation ViewController - (void)awakeFromNib { + [super awakeFromNib]; + //set up data //your carousel should always be driven by an array of //data of some kind - don't store data in your item views diff --git a/Examples/Swift Example/SwiftExample.xcodeproj/project.pbxproj b/Examples/Swift Example/SwiftExample.xcodeproj/project.pbxproj index cb372e69ef..ef729f6543 100644 --- a/Examples/Swift Example/SwiftExample.xcodeproj/project.pbxproj +++ b/Examples/Swift Example/SwiftExample.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 018F22011DBCCDBF00BDBD68 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 018F22001DBCCDBF00BDBD68 /* Default-568h@2x.png */; }; 138BCA6B1989946E0009467C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138BCA6A1989946E0009467C /* AppDelegate.swift */; }; 138BCA6D1989946E0009467C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138BCA6C1989946E0009467C /* ViewController.swift */; }; 138BCA701989946E0009467C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 138BCA6E1989946E0009467C /* Main.storyboard */; }; @@ -15,6 +16,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 018F22001DBCCDBF00BDBD68 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 138BCA651989946E0009467C /* SwiftExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 138BCA691989946E0009467C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 138BCA6A1989946E0009467C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -72,6 +74,7 @@ 138BCA681989946E0009467C /* Supporting Files */ = { isa = PBXGroup; children = ( + 018F22001DBCCDBF00BDBD68 /* Default-568h@2x.png */, 138BCA691989946E0009467C /* Info.plist */, ); name = "Supporting Files"; @@ -114,11 +117,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Charcoal Design"; TargetAttributes = { 138BCA641989946E0009467C = { CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; }; }; }; @@ -147,6 +151,7 @@ files = ( 138BCA701989946E0009467C /* Main.storyboard in Resources */, 138BCA721989946E0009467C /* Images.xcassets in Resources */, + 018F22011DBCCDBF00BDBD68 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -190,8 +195,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -200,6 +207,7 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -233,8 +241,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -242,6 +252,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -251,6 +262,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -268,6 +280,7 @@ PRODUCT_MODULE_NAME = SwiftExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -284,6 +297,7 @@ PRODUCT_MODULE_NAME = SwiftExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h"; + SWIFT_VERSION = 2.3; }; name = Release; }; diff --git a/Examples/Swift Example/SwiftExample/AppDelegate.swift b/Examples/Swift Example/SwiftExample/AppDelegate.swift index 546c31adf1..63f1ef70db 100644 --- a/Examples/Swift Example/SwiftExample/AppDelegate.swift +++ b/Examples/Swift Example/SwiftExample/AppDelegate.swift @@ -9,8 +9,7 @@ import UIKit @UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate -{ +class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? } diff --git a/Examples/Swift Example/SwiftExample/Default-568h@2x.png b/Examples/Swift Example/SwiftExample/Default-568h@2x.png new file mode 100644 index 0000000000..0891b7aabf Binary files /dev/null and b/Examples/Swift Example/SwiftExample/Default-568h@2x.png differ diff --git a/Examples/Swift Example/SwiftExample/ViewController.swift b/Examples/Swift Example/SwiftExample/ViewController.swift index 35b1af65ef..983406e380 100644 --- a/Examples/Swift Example/SwiftExample/ViewController.swift +++ b/Examples/Swift Example/SwiftExample/ViewController.swift @@ -8,74 +8,63 @@ import UIKit -class ViewController: UIViewController, iCarouselDataSource, iCarouselDelegate -{ +class ViewController: UIViewController, iCarouselDataSource, iCarouselDelegate { var items: [Int] = [] - @IBOutlet var carousel : iCarousel! - - override func awakeFromNib() - { + @IBOutlet var carousel: iCarousel! + + override func awakeFromNib() { super.awakeFromNib() - for i in 0...99 - { + for i in 0 ... 99 { items.append(i) } } - - override func viewDidLoad() - { + + override func viewDidLoad() { super.viewDidLoad() carousel.type = .CoverFlow2 } - - func numberOfItemsInCarousel(carousel: iCarousel) -> Int - { + + func numberOfItemsInCarousel(carousel: iCarousel) -> Int { return items.count } - func carousel(carousel: iCarousel, viewForItemAtIndex index: Int, reusingView view: UIView?) -> UIView - { + func carousel(carousel: iCarousel, viewForItemAtIndex index: Int, reusingView view: UIView?) -> UIView { var label: UILabel var itemView: UIImageView - //create new view if no view is available for recycling - if (view == nil) - { + //reuse view if available, otherwise create a new view + if let view = view as? UIImageView { + itemView = view + //get a reference to the label in the recycled view + label = itemView.viewWithTag(1) as! UILabel + } else { //don't do anything specific to the index within - //this `if (view == nil) {...}` statement because the view will be + //this `if ... else` statement because the view will be //recycled and used with other index values later - itemView = UIImageView(frame:CGRect(x:0, y:0, width:200, height:200)) + itemView = UIImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) itemView.image = UIImage(named: "page.png") itemView.contentMode = .Center - - label = UILabel(frame:itemView.bounds) + + label = UILabel(frame: itemView.bounds) label.backgroundColor = UIColor.clearColor() label.textAlignment = .Center label.font = label.font.fontWithSize(50) label.tag = 1 itemView.addSubview(label) } - else - { - //get a reference to the label in the recycled view - itemView = view as! UIImageView; - label = itemView.viewWithTag(1) as! UILabel! - } - + //set item label //remember to always set any properties of your carousel item //views outside of the `if (view == nil) {...}` check otherwise //you'll get weird issues with carousel item content appearing //in the wrong place in the carousel label.text = "\(items[index])" - + return itemView } - - func carousel(carousel: iCarousel, valueForOption option: iCarouselOption, withDefault value: CGFloat) -> CGFloat - { - if (option == .Spacing) - { + + func carousel(carousel: iCarousel, valueForOption option: iCarouselOption, withDefault value: CGFloat) -> CGFloat { + if (option == .Spacing) { return value * 1.1 } return value diff --git a/Examples/Swift3 Example/SwiftExample.xcodeproj/project.pbxproj b/Examples/Swift3 Example/SwiftExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..28a33caffa --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample.xcodeproj/project.pbxproj @@ -0,0 +1,328 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 018F21FF1DBCCDA100BDBD68 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 018F21FE1DBCCDA100BDBD68 /* Default-568h@2x.png */; }; + 138BCA6B1989946E0009467C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138BCA6A1989946E0009467C /* AppDelegate.swift */; }; + 138BCA6D1989946E0009467C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138BCA6C1989946E0009467C /* ViewController.swift */; }; + 138BCA701989946E0009467C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 138BCA6E1989946E0009467C /* Main.storyboard */; }; + 138BCA721989946E0009467C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 138BCA711989946E0009467C /* Images.xcassets */; }; + 13F10FEB198997000066DA2E /* iCarousel.m in Sources */ = {isa = PBXBuildFile; fileRef = 13F10FEA198997000066DA2E /* iCarousel.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 018F21FE1DBCCDA100BDBD68 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 138BCA651989946E0009467C /* SwiftExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 138BCA691989946E0009467C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 138BCA6A1989946E0009467C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 138BCA6C1989946E0009467C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 138BCA6F1989946E0009467C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 138BCA711989946E0009467C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 13F10FE9198997000066DA2E /* iCarousel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iCarousel.h; sourceTree = ""; }; + 13F10FEA198997000066DA2E /* iCarousel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iCarousel.m; sourceTree = ""; }; + 13F10FEC198997560066DA2E /* SwiftExample-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SwiftExample-Bridging-Header.h"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 138BCA621989946E0009467C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 138BCA5C1989946E0009467C = { + isa = PBXGroup; + children = ( + 13F10FE8198997000066DA2E /* iCarousel */, + 138BCA671989946E0009467C /* SwiftExample */, + 138BCA661989946E0009467C /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + }; + 138BCA661989946E0009467C /* Products */ = { + isa = PBXGroup; + children = ( + 138BCA651989946E0009467C /* SwiftExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 138BCA671989946E0009467C /* SwiftExample */ = { + isa = PBXGroup; + children = ( + 13F10FEC198997560066DA2E /* SwiftExample-Bridging-Header.h */, + 138BCA6A1989946E0009467C /* AppDelegate.swift */, + 138BCA6C1989946E0009467C /* ViewController.swift */, + 138BCA6E1989946E0009467C /* Main.storyboard */, + 138BCA711989946E0009467C /* Images.xcassets */, + 138BCA681989946E0009467C /* Supporting Files */, + ); + path = SwiftExample; + sourceTree = ""; + }; + 138BCA681989946E0009467C /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 018F21FE1DBCCDA100BDBD68 /* Default-568h@2x.png */, + 138BCA691989946E0009467C /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13F10FE8198997000066DA2E /* iCarousel */ = { + isa = PBXGroup; + children = ( + 13F10FE9198997000066DA2E /* iCarousel.h */, + 13F10FEA198997000066DA2E /* iCarousel.m */, + ); + name = iCarousel; + path = ../../iCarousel; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 138BCA641989946E0009467C /* SwiftExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 138BCA811989946E0009467C /* Build configuration list for PBXNativeTarget "SwiftExample" */; + buildPhases = ( + 138BCA611989946E0009467C /* Sources */, + 138BCA621989946E0009467C /* Frameworks */, + 138BCA631989946E0009467C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwiftExample; + productName = SwiftExample; + productReference = 138BCA651989946E0009467C /* SwiftExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 138BCA5D1989946E0009467C /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = "Charcoal Design"; + TargetAttributes = { + 138BCA641989946E0009467C = { + CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; + }; + }; + }; + buildConfigurationList = 138BCA601989946E0009467C /* Build configuration list for PBXProject "SwiftExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 138BCA5C1989946E0009467C; + productRefGroup = 138BCA661989946E0009467C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 138BCA641989946E0009467C /* SwiftExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 138BCA631989946E0009467C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 138BCA701989946E0009467C /* Main.storyboard in Resources */, + 138BCA721989946E0009467C /* Images.xcassets in Resources */, + 018F21FF1DBCCDA100BDBD68 /* Default-568h@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 138BCA611989946E0009467C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13F10FEB198997000066DA2E /* iCarousel.m in Sources */, + 138BCA6D1989946E0009467C /* ViewController.swift in Sources */, + 138BCA6B1989946E0009467C /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 138BCA6E1989946E0009467C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 138BCA6F1989946E0009467C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 138BCA7F1989946E0009467C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 138BCA801989946E0009467C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 138BCA821989946E0009467C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + DEFINES_MODULE = YES; + INFOPLIST_FILE = SwiftExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_MODULE_NAME = SwiftExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 138BCA831989946E0009467C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + DEFINES_MODULE = YES; + INFOPLIST_FILE = SwiftExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_MODULE_NAME = SwiftExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 138BCA601989946E0009467C /* Build configuration list for PBXProject "SwiftExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 138BCA7F1989946E0009467C /* Debug */, + 138BCA801989946E0009467C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 138BCA811989946E0009467C /* Build configuration list for PBXNativeTarget "SwiftExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 138BCA821989946E0009467C /* Debug */, + 138BCA831989946E0009467C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 138BCA5D1989946E0009467C /* Project object */; +} diff --git a/Examples/Swift3 Example/SwiftExample/AppDelegate.swift b/Examples/Swift3 Example/SwiftExample/AppDelegate.swift new file mode 100644 index 0000000000..63f1ef70db --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/AppDelegate.swift @@ -0,0 +1,15 @@ +// +// AppDelegate.swift +// SwiftExample +// +// Created by Nick Lockwood on 30/07/2014. +// Copyright (c) 2014 Charcoal Design. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? +} + diff --git a/Examples/Swift3 Example/SwiftExample/Base.lproj/Main.storyboard b/Examples/Swift3 Example/SwiftExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..ee90b6612f --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Base.lproj/Main.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/Swift3 Example/SwiftExample/Default-568h@2x.png b/Examples/Swift3 Example/SwiftExample/Default-568h@2x.png new file mode 100644 index 0000000000..0891b7aabf Binary files /dev/null and b/Examples/Swift3 Example/SwiftExample/Default-568h@2x.png differ diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/Swift3 Example/SwiftExample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..b8236c6534 --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/LaunchImage.launchimage/Contents.json b/Examples/Swift3 Example/SwiftExample/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000000..c79ebd3ada --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/Contents.json b/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/Contents.json new file mode 100644 index 0000000000..a79b707023 --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "background.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/background.png b/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/background.png new file mode 100644 index 0000000000..c3b6c35429 Binary files /dev/null and b/Examples/Swift3 Example/SwiftExample/Images.xcassets/background.imageset/background.png differ diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/Contents.json b/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/Contents.json new file mode 100644 index 0000000000..fb3722b654 --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "page.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/page.png b/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/page.png new file mode 100644 index 0000000000..45fc747f00 Binary files /dev/null and b/Examples/Swift3 Example/SwiftExample/Images.xcassets/page.imageset/page.png differ diff --git a/Examples/Swift3 Example/SwiftExample/Info.plist b/Examples/Swift3 Example/SwiftExample/Info.plist new file mode 100644 index 0000000000..af40bba18d --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + + diff --git a/Examples/Swift3 Example/SwiftExample/SwiftExample-Bridging-Header.h b/Examples/Swift3 Example/SwiftExample/SwiftExample-Bridging-Header.h new file mode 100644 index 0000000000..155807e181 --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/SwiftExample-Bridging-Header.h @@ -0,0 +1,9 @@ +// +// SwiftExample-Bridging-Header.h +// SwiftExample +// +// Created by Nick Lockwood on 30/07/2014. +// Copyright (c) 2014 Charcoal Design. All rights reserved. +// + +#import "iCarousel.h" diff --git a/Examples/Swift3 Example/SwiftExample/ViewController.swift b/Examples/Swift3 Example/SwiftExample/ViewController.swift new file mode 100644 index 0000000000..579f2a65a7 --- /dev/null +++ b/Examples/Swift3 Example/SwiftExample/ViewController.swift @@ -0,0 +1,74 @@ +// +// ViewController.swift +// SwiftExample +// +// Created by Nick Lockwood on 30/07/2014. +// Copyright (c) 2014 Charcoal Design. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController, iCarouselDataSource, iCarouselDelegate { + var items: [Int] = [] + @IBOutlet var carousel: iCarousel! + + override func awakeFromNib() { + super.awakeFromNib() + for i in 0 ... 99 { + items.append(i) + } + } + + override func viewDidLoad() { + super.viewDidLoad() + carousel.type = .coverFlow2 + } + + func numberOfItems(in carousel: iCarousel) -> Int { + return items.count + } + + func carousel(_ carousel: iCarousel, viewForItemAt index: Int, reusing view: UIView?) -> UIView { + var label: UILabel + var itemView: UIImageView + + //reuse view if available, otherwise create a new view + if let view = view as? UIImageView { + itemView = view + //get a reference to the label in the recycled view + label = itemView.viewWithTag(1) as! UILabel + } else { + //don't do anything specific to the index within + //this `if ... else` statement because the view will be + //recycled and used with other index values later + itemView = UIImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) + itemView.image = UIImage(named: "page.png") + itemView.contentMode = .center + + label = UILabel(frame: itemView.bounds) + label.backgroundColor = .clear + label.textAlignment = .center + label.font = label.font.withSize(50) + label.tag = 1 + itemView.addSubview(label) + } + + //set item label + //remember to always set any properties of your carousel item + //views outside of the `if (view == nil) {...}` check otherwise + //you'll get weird issues with carousel item content appearing + //in the wrong place in the carousel + label.text = "\(items[index])" + + return itemView + } + + func carousel(_ carousel: iCarousel, valueFor option: iCarouselOption, withDefault value: CGFloat) -> CGFloat { + if (option == .spacing) { + return value * 1.1 + } + return value + } + +} + diff --git a/Examples/Tables Demo/iCarouselExampleAppDelegate.m b/Examples/Tables Demo/iCarouselExampleAppDelegate.m index f2a333aecd..ceb48f9fb9 100644 --- a/Examples/Tables Demo/iCarouselExampleAppDelegate.m +++ b/Examples/Tables Demo/iCarouselExampleAppDelegate.m @@ -16,7 +16,7 @@ @implementation iCarouselExampleAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [window addSubview:viewController.view]; + window.rootViewController = viewController; [window makeKeyAndVisible]; return YES; } diff --git a/Examples/Tables Demo/iCarouselTest-Info.plist b/Examples/Tables Demo/iCarouselTest-Info.plist index 58f4485124..0284a6bf38 100644 --- a/Examples/Tables Demo/iCarouselTest-Info.plist +++ b/Examples/Tables Demo/iCarouselTest-Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,13 +28,13 @@ NSMainNibFile MainWindow + UIStatusBarHidden + UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIStatusBarHidden - diff --git a/Examples/Tables Demo/iCarouselTest.xcodeproj/project.pbxproj b/Examples/Tables Demo/iCarouselTest.xcodeproj/project.pbxproj index 56cc901415..cfc2d92d7b 100644 --- a/Examples/Tables Demo/iCarouselTest.xcodeproj/project.pbxproj +++ b/Examples/Tables Demo/iCarouselTest.xcodeproj/project.pbxproj @@ -148,7 +148,7 @@ 01308D8513491C3500453707 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0800; }; buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselTest" */; compatibilityVersion = "Xcode 3.2"; @@ -226,6 +226,7 @@ isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; @@ -233,7 +234,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -247,7 +248,7 @@ GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; @@ -265,6 +266,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselTest-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselTest; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; @@ -282,6 +284,7 @@ GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "iCarouselTest-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = iCarouselTest; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; diff --git a/LICENCE.md b/LICENCE.md index 0a59bb1d63..689b0985e1 100755 --- a/LICENCE.md +++ b/LICENCE.md @@ -1,7 +1,5 @@ iCarousel -Version 1.8.2, August 10th, 2015 - Copyright (C) 2011 Charcoal Design This software is provided 'as-is', without any express or implied diff --git a/README.md b/README.md index d0272eda42..e80ed40392 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ iCarousel is a class designed to simplify the implementation of various types of Supported OS & SDK Versions ----------------------------- -* Supported build target - iOS 8.0 / Mac OS 10.10 (Xcode 6.4, Apple LLVM compiler 6.1) +* Supported build target - iOS 10.0 / Mac OS 10.12 (Xcode 8.0, Apple LLVM compiler 8.0) * Earliest supported deployment target - iOS 5.0 / Mac OS 10.7 * Earliest compatible deployment target - iOS 4.3 / Mac OS 10.6 @@ -31,7 +31,7 @@ iCarousel is derived from UIView and - as with all UIKit components - it should Installation -------------- -To use the iCarousel class in an app, just drag the iCarousel class files (demo files and assets are not needed) into your project and add the QuartzCore framework. +To use the iCarousel class in an app, just drag the iCarousel class files (demo files and assets are not needed) into your project and add the QuartzCore framework. You can also install it using Cocoapods in the normal way. Chameleon Support @@ -519,6 +519,9 @@ This example demonstrates how to use UITableViews inside your iCarousel item vie FAQ ------------ + Q. Does iCarousel support Swift? + A. Yes, check out Swift Example and Swift3 Example projects. + Q. I upgraded to the new version of iCarousel and it broke my project, how do I get the old one back? A. Every previous release of iCarousel is tagged as a separate download on github - look in the tags tab. @@ -571,6 +574,11 @@ FAQ Release Notes ---------------- +Version 1.8.3 + +- Fixed warnings and updated examples for Xcode 8 +- Added Swift 3 example + Version 1.8.2 - Fixed some warnings and updated examples for Xcode 7 beta diff --git a/iCarousel.podspec.json b/iCarousel.podspec.json index 83029e427b..382ab73678 100644 --- a/iCarousel.podspec.json +++ b/iCarousel.podspec.json @@ -1,6 +1,6 @@ { "name": "iCarousel", - "version": "1.8.2", + "version": "1.8.3", "license": { "type": "zlib", "file": "LICENCE.md" @@ -12,7 +12,7 @@ }, "source": { "git": "https://github.com/nicklockwood/iCarousel.git", - "tag": "1.8.2" + "tag": "1.8.3" }, "source_files": "iCarousel/iCarousel.{h,m}", "requires_arc": true, diff --git a/iCarousel/iCarousel.h b/iCarousel/iCarousel.h index d49c268203..f32516a845 100644 --- a/iCarousel/iCarousel.h +++ b/iCarousel/iCarousel.h @@ -1,7 +1,7 @@ // // iCarousel.h // -// Version 1.8.2 +// Version 1.8.3 // // Created by Nick Lockwood on 01/04/2011. // Copyright 2011 Charcoal Design diff --git a/iCarousel/iCarousel.m b/iCarousel/iCarousel.m index eaf18cba43..485a878bb8 100644 --- a/iCarousel/iCarousel.m +++ b/iCarousel/iCarousel.m @@ -1,7 +1,7 @@ // // iCarousel.m // -// Version 1.8.2 +// Version 1.8.3 // // Created by Nick Lockwood on 01/04/2011. // Copyright 2011 Charcoal Design @@ -32,6 +32,7 @@ #import "iCarousel.h" #import +#import #import @@ -43,14 +44,16 @@ #if !defined(__has_warning) || __has_warning("-Wreceiver-is-weak") # pragma GCC diagnostic ignored "-Wreceiver-is-weak" #endif -#pragma GCC diagnostic ignored "-Warc-repeated-use-of-weak" -#pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis" -#pragma GCC diagnostic ignored "-Wdirect-ivar-access" -#pragma GCC diagnostic ignored "-Wunused-macros" -#pragma GCC diagnostic ignored "-Wconversion" -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#pragma GCC diagnostic ignored "-Wselector" -#pragma GCC diagnostic ignored "-Wgnu" +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" +#pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis" +#pragma clang diagnostic ignored "-Wdirect-ivar-access" +#pragma clang diagnostic ignored "-Wunused-macros" +#pragma clang diagnostic ignored "-Wconversion" +#pragma clang diagnostic ignored "-Wformat-nonliteral" +#pragma clang diagnostic ignored "-Wpartial-availability" +#pragma clang diagnostic ignored "-Wdouble-promotion" +#pragma clang diagnostic ignored "-Wselector" +#pragma clang diagnostic ignored "-Wgnu" #define MIN_TOGGLE_DURATION 0.2 @@ -366,9 +369,9 @@ - (NSInteger)indexOfItemView:(UIView *)view - (NSInteger)indexOfItemViewOrSubview:(UIView *)view { NSInteger index = [self indexOfItemView:view]; - if (index == NSNotFound && view != nil && view != _contentView) + if (index == NSNotFound && view.superview && view != _contentView) { - return [self indexOfItemViewOrSubview:view.superview]; + return [self indexOfItemViewOrSubview:(UIView *__nonnull)view.superview]; } return index; } @@ -436,8 +439,8 @@ - (void)insertView:(UIView *)view atIndex:(NSInteger)index - (CGFloat)alphaForItemWithOffset:(CGFloat)offset { - CGFloat fadeMin = -INFINITY; - CGFloat fadeMax = INFINITY; + CGFloat fadeMin = (CGFloat)-INFINITY; + CGFloat fadeMax = (CGFloat)INFINITY; CGFloat fadeRange = 1.0; CGFloat fadeMinAlpha = 0.0; switch (_type) @@ -530,7 +533,7 @@ - (CATransform3D)transformForItemViewWithOffset:(CGFloat)offset CGFloat count = [self circularCarouselItemCount]; CGFloat spacing = [self valueForOption:iCarouselOptionSpacing withDefault:1.0]; CGFloat arc = [self valueForOption:iCarouselOptionArc withDefault:M_PI * 2.0]; - CGFloat radius = [self valueForOption:iCarouselOptionRadius withDefault:MAX(_itemWidth * spacing / 2.0, _itemWidth * spacing / 2.0 / tanf(arc/2.0/count))]; + CGFloat radius = [self valueForOption:iCarouselOptionRadius withDefault:MAX(_itemWidth * spacing / 2.0, _itemWidth * spacing / 2.0 / tan(arc/2.0/count))]; CGFloat angle = [self valueForOption:iCarouselOptionAngle withDefault:offset / count * arc]; if (_type == iCarouselTypeInvertedRotary) @@ -554,7 +557,7 @@ - (CATransform3D)transformForItemViewWithOffset:(CGFloat)offset CGFloat count = [self circularCarouselItemCount]; CGFloat spacing = [self valueForOption:iCarouselOptionSpacing withDefault:1.0]; CGFloat arc = [self valueForOption:iCarouselOptionArc withDefault:M_PI * 2.0]; - CGFloat radius = [self valueForOption:iCarouselOptionRadius withDefault:MAX(0.01, _itemWidth * spacing / 2.0 / tanf(arc/2.0/count))]; + CGFloat radius = [self valueForOption:iCarouselOptionRadius withDefault:MAX(0.01, _itemWidth * spacing / 2.0 / tan(arc/2.0/count))]; CGFloat angle = [self valueForOption:iCarouselOptionAngle withDefault:offset / count * arc]; if (_type == iCarouselTypeInvertedCylinder) @@ -607,7 +610,7 @@ - (CATransform3D)transformForItemViewWithOffset:(CGFloat)offset case iCarouselTypeCoverFlow: case iCarouselTypeCoverFlow2: { - CGFloat tilt = [self valueForOption:iCarouselOptionTilt withDefault:0.9f]; + CGFloat tilt = [self valueForOption:iCarouselOptionTilt withDefault:0.9]; CGFloat spacing = [self valueForOption:iCarouselOptionSpacing withDefault:0.25]; CGFloat clampedOffset = MAX(-1.0, MIN(1.0, offset)); @@ -662,7 +665,7 @@ - (CATransform3D)transformForItemViewWithOffset:(CGFloat)offset case iCarouselTypeTimeMachine: case iCarouselTypeInvertedTimeMachine: { - CGFloat tilt = [self valueForOption:iCarouselOptionTilt withDefault:0.3f]; + CGFloat tilt = [self valueForOption:iCarouselOptionTilt withDefault:0.3]; CGFloat spacing = [self valueForOption:iCarouselOptionSpacing withDefault:1.0]; if (_type == iCarouselTypeInvertedTimeMachine) @@ -2065,7 +2068,8 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gesture - (void)didTap:(UITapGestureRecognizer *)tapGesture { //check for tapped view - NSInteger index = [self indexOfItemView:[self itemViewAtPoint:[tapGesture locationInView:_contentView]]]; + UIView *itemView = [self itemViewAtPoint:[tapGesture locationInView:_contentView]]; + NSInteger index = itemView? [self indexOfItemView:itemView]: NSNotFound; if (index != NSNotFound) { if (!_delegate || [_delegate carousel:self shouldSelectItemAtIndex:index]) @@ -2101,7 +2105,7 @@ - (void)didPan:(UIPanGestureRecognizer *)panGesture _decelerating = NO; _previousTranslation = _vertical? [panGesture translationInView:self].y: [panGesture translationInView:self].x; -#if USING_CHAMELEON +#if defined(USING_CHAMELEON) && USING_CHAMELEON _previousTranslation = -_previousTranslation; #endif @@ -2163,7 +2167,7 @@ - (void)didPan:(UIPanGestureRecognizer *)panGesture CGFloat translation = _vertical? [panGesture translationInView:self].y: [panGesture translationInView:self].x; CGFloat velocity = _vertical? [panGesture velocityInView:self].y: [panGesture velocityInView:self].x; -#if USING_CHAMELEON +#if defined(USING_CHAMELEON) && USING_CHAMELEON translation = -translation; velocity = -velocity; @@ -2243,7 +2247,8 @@ - (void)mouseUp:(NSEvent *)theEvent position = [self convertPoint:position fromView:self.window.contentView]; //check for tapped view - NSInteger index = [self indexOfItemView:[self itemViewAtPoint:position]]; + UIView *itemView = [self itemViewAtPoint:position]; + NSInteger index = itemView? [self indexOfItemView: itemView]: NSNotFound; if (index != NSNotFound) { if (_centerItemWhenSelected && index != self.currentItemIndex)