Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Examples/Advanced iOS Demo/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,6 +28,8 @@
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand All @@ -36,7 +38,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
01308D9113491C3500453707 /* Frameworks */,
01308D8F13491C3500453707 /* Products */,
);
indentWidth = 4;
sourceTree = "<group>";
tabWidth = 4;
};
01308D8F13491C3500453707 /* Products */ = {
isa = PBXGroup;
Expand Down Expand Up @@ -161,7 +163,7 @@
01308D8513491C3500453707 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 01308D8813491C3500453707 /* Build configuration list for PBXProject "iCarouselExample" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -258,6 +260,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
Expand Down Expand Up @@ -289,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 @@ -346,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 All @@ -367,6 +370,7 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
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 @@ -385,6 +389,7 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
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
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
4 changes: 3 additions & 1 deletion 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 Expand Up @@ -116,7 +118,7 @@ - (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option
{
if (option == iCarouselOptionSpacing)
{
return value * 1.1f;
return value * 1.1;
}
return value;
}
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
Loading