Skip to content

Commit

Permalink
Updated to version 1.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Oct 23, 2016
1 parent 07acdba commit f042f8c
Show file tree
Hide file tree
Showing 81 changed files with 1,007 additions and 537 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
36 changes: 12 additions & 24 deletions Examples/Advanced iOS Demo/iCarouselExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 () <UIActionSheetDelegate>
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
}
Expand All @@ -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
Expand All @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions Examples/Basic iOS Example/iCarouselExample-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -28,14 +28,14 @@
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions Examples/Basic iOS Example/iCarouselExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Examples/Buttons Demo/iCarouselButtonsDemo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.charcoaldesign.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -28,13 +28,13 @@
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -242,14 +242,15 @@
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;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
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;
};
Expand All @@ -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;
};
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,10 +23,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
Expand All @@ -38,17 +38,21 @@
ReferencedContainer = "container:iCarouselButtonsDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "01308D8D13491C3500453707"
Expand All @@ -61,12 +65,13 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "01308D8D13491C3500453707"
Expand Down
4 changes: 2 additions & 2 deletions Examples/Buttons Demo/iCarouselExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index r
}

//set button label
[button setTitle:[NSString stringWithFormat:@"%i", index] forState:UIControlStateNormal];
[button setTitle:[NSString stringWithFormat:@"%zd", index] forState:UIControlStateNormal];

return button;
}
Expand All @@ -83,7 +83,7 @@ - (void)buttonTapped:(UIButton *)sender
NSInteger index = [carousel indexOfItemViewOrSubview:sender];

[[[UIAlertView alloc] initWithTitle:@"Button Tapped"
message:[NSString stringWithFormat:@"You tapped button number %i", index]
message:[NSString stringWithFormat:@"You tapped button number %zd", index]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil] show];
Expand Down
Loading

0 comments on commit f042f8c

Please sign in to comment.