Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7924f4ae1a | ||
|
|
a0f43fa3b6 | ||
|
|
f2ceaff18e | ||
|
|
19af60376a | ||
|
|
9ec801a03d | ||
|
|
cbd090fcc6 | ||
|
|
723d30af95 | ||
|
|
47d262902c | ||
|
|
739c320ae9 | ||
|
|
551052bfb7 | ||
|
|
3ccbf1b099 | ||
|
|
932920b45b | ||
|
|
01b09a94ea | ||
|
|
8c234e4e0d | ||
|
|
974ab5eed5 | ||
|
|
8e7bb1ee35 | ||
|
|
5d6c1b6dad | ||
|
|
982c9e1b30 | ||
|
|
6956f385b3 | ||
|
|
4f641597d7 | ||
|
|
878a473b02 | ||
|
|
1ebd9b3e6f | ||
|
|
b7dc1f1d75 | ||
|
|
21e64f72c1 | ||
|
|
33dfe08a96 | ||
|
|
9d0982e62d | ||
|
|
b1b564e1e9 | ||
|
|
3ca2172098 | ||
|
|
9ea71b64eb | ||
|
|
306632b484 | ||
|
|
def7ad435b | ||
|
|
9db9073217 | ||
|
|
a5efd73115 | ||
|
|
882ef88655 | ||
|
|
216a62c6ab | ||
|
|
ce1d4cd8bd | ||
|
|
0e87bcfc63 | ||
|
|
3bc71e84ee | ||
|
|
4f5a0ca337 | ||
|
|
ab8c7feee8 | ||
|
|
27913fd179 | ||
|
|
775c05a1d0 | ||
|
|
2953ca5342 | ||
|
|
16ba4b27b0 | ||
|
|
36c23cf714 | ||
|
|
d6e37f7f01 | ||
|
|
38fa225507 | ||
|
|
98352afdc7 | ||
|
|
e5c63c9812 | ||
|
|
4ec5646fa1 | ||
|
|
20d7be5ca0 | ||
|
|
0871b243b3 | ||
|
|
d41c599568 | ||
|
|
e720eaf3f3 | ||
|
|
4c3d646349 | ||
|
|
4d41164378 |
@@ -1,6 +1,6 @@
|
||||
osx_image: xcode7.2
|
||||
osx_image: xcode7.3
|
||||
language: objective-c
|
||||
|
||||
xcode_project: FoldingCell/FoldingCell.xcodeproj
|
||||
xcode_scheme: FoldingCell
|
||||
xcode_sdk: iphonesimulator9.1
|
||||
xcode_sdk: iphonesimulator
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'FoldingCell'
|
||||
s.version = '0.3'
|
||||
s.version = '0.8.1'
|
||||
s.summary = 'UITableViewCell with folding animation.'
|
||||
s.homepage = 'https://github.com/Ramotion/folding-cell'
|
||||
s.license = 'MIT'
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
847A581F1C29500B0028FB84 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847A581E1C29500B0028FB84 /* MainTableViewController.swift */; };
|
||||
848B463B1C56458C00D49B45 /* FoldingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847A581A1C294FAB0028FB84 /* FoldingCell.swift */; };
|
||||
8498513F1C5639F9006FA400 /* FoldingCellTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8498513E1C5639F9006FA400 /* FoldingCellTests.swift */; };
|
||||
8499D8881D0054A8004B5B37 /* FoldingCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499D8871D0054A8004B5B37 /* FoldingCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8499D88C1D0054A8004B5B37 /* FoldingCell.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8851D0054A8004B5B37 /* FoldingCell.framework */; };
|
||||
8499D88D1D0054A8004B5B37 /* FoldingCell.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8851D0054A8004B5B37 /* FoldingCell.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
8499D8911D0054BF004B5B37 /* FoldingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847A581A1C294FAB0028FB84 /* FoldingCell.swift */; };
|
||||
8499F5DD1C2A83F70027D5D2 /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8499F5D31C2A83F70027D5D2 /* OpenSans-Bold.ttf */; };
|
||||
8499F5DE1C2A83F70027D5D2 /* OpenSans-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8499F5D41C2A83F70027D5D2 /* OpenSans-BoldItalic.ttf */; };
|
||||
8499F5DF1C2A83F70027D5D2 /* OpenSans-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8499F5D51C2A83F70027D5D2 /* OpenSans-ExtraBold.ttf */; };
|
||||
@@ -36,6 +40,13 @@
|
||||
remoteGlobalIDString = 847A58031C294F750028FB84;
|
||||
remoteInfo = FoldingCell;
|
||||
};
|
||||
8499D88A1D0054A8004B5B37 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 847A57FC1C294F750028FB84 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8499D8841D0054A8004B5B37;
|
||||
remoteInfo = FoldingCell;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -45,6 +56,7 @@
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
8499D88D1D0054A8004B5B37 /* FoldingCell.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -54,7 +66,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
840B984B1C33FE660081B926 /* FoldingCellFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FoldingCellFramework.h; sourceTree = "<group>"; };
|
||||
840B984D1C33FE660081B926 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
847A58041C294F750028FB84 /* FoldingCell.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FoldingCell.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
847A58041C294F750028FB84 /* FoldingCellDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FoldingCellDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
847A58071C294F750028FB84 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
847A580C1C294F750028FB84 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
847A580E1C294F750028FB84 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
@@ -65,6 +77,9 @@
|
||||
8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FoldingCellTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8498513E1C5639F9006FA400 /* FoldingCellTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FoldingCellTests.swift; sourceTree = "<group>"; };
|
||||
849851401C5639F9006FA400 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8499D8851D0054A8004B5B37 /* FoldingCell.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FoldingCell.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8499D8871D0054A8004B5B37 /* FoldingCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FoldingCell.h; sourceTree = "<group>"; };
|
||||
8499D8891D0054A8004B5B37 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8499F5D31C2A83F70027D5D2 /* OpenSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-Bold.ttf"; sourceTree = "<group>"; };
|
||||
8499F5D41C2A83F70027D5D2 /* OpenSans-BoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-BoldItalic.ttf"; sourceTree = "<group>"; };
|
||||
8499F5D51C2A83F70027D5D2 /* OpenSans-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-ExtraBold.ttf"; sourceTree = "<group>"; };
|
||||
@@ -83,6 +98,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D88C1D0054A8004B5B37 /* FoldingCell.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -93,6 +109,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D8811D0054A8004B5B37 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@@ -111,6 +134,7 @@
|
||||
847A58061C294F750028FB84 /* FoldingCell */,
|
||||
840B984A1C33FE660081B926 /* FoldingCellFramework */,
|
||||
8498513D1C5639F9006FA400 /* FoldingCellTests */,
|
||||
8499D8861D0054A8004B5B37 /* FoldingCell */,
|
||||
847A58051C294F750028FB84 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -118,8 +142,9 @@
|
||||
847A58051C294F750028FB84 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
847A58041C294F750028FB84 /* FoldingCell.app */,
|
||||
847A58041C294F750028FB84 /* FoldingCellDemo.app */,
|
||||
8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */,
|
||||
8499D8851D0054A8004B5B37 /* FoldingCell.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -157,6 +182,15 @@
|
||||
path = FoldingCellTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8499D8861D0054A8004B5B37 /* FoldingCell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8499D8871D0054A8004B5B37 /* FoldingCell.h */,
|
||||
8499D8891D0054A8004B5B37 /* Info.plist */,
|
||||
);
|
||||
path = FoldingCell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8499F5D21C2A83D90027D5D2 /* Fonts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -176,10 +210,21 @@
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8499D8821D0054A8004B5B37 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D8881D0054A8004B5B37 /* FoldingCell.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
847A58031C294F750028FB84 /* FoldingCell */ = {
|
||||
847A58031C294F750028FB84 /* FoldingCellDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 847A58161C294F750028FB84 /* Build configuration list for PBXNativeTarget "FoldingCell" */;
|
||||
buildConfigurationList = 847A58161C294F750028FB84 /* Build configuration list for PBXNativeTarget "FoldingCellDemo" */;
|
||||
buildPhases = (
|
||||
847A58001C294F750028FB84 /* Sources */,
|
||||
847A58011C294F750028FB84 /* Frameworks */,
|
||||
@@ -189,10 +234,11 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
8499D88B1D0054A8004B5B37 /* PBXTargetDependency */,
|
||||
);
|
||||
name = FoldingCell;
|
||||
name = FoldingCellDemo;
|
||||
productName = FoldingCell;
|
||||
productReference = 847A58041C294F750028FB84 /* FoldingCell.app */;
|
||||
productReference = 847A58041C294F750028FB84 /* FoldingCellDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
8498513B1C5639F9006FA400 /* FoldingCellTests */ = {
|
||||
@@ -213,6 +259,24 @@
|
||||
productReference = 8498513C1C5639F9006FA400 /* FoldingCellTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
8499D8841D0054A8004B5B37 /* FoldingCell */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 8499D88E1D0054A8004B5B37 /* Build configuration list for PBXNativeTarget "FoldingCell" */;
|
||||
buildPhases = (
|
||||
8499D8801D0054A8004B5B37 /* Sources */,
|
||||
8499D8811D0054A8004B5B37 /* Frameworks */,
|
||||
8499D8821D0054A8004B5B37 /* Headers */,
|
||||
8499D8831D0054A8004B5B37 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = FoldingCell;
|
||||
productName = FoldingCell;
|
||||
productReference = 8499D8851D0054A8004B5B37 /* FoldingCell.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@@ -225,12 +289,16 @@
|
||||
TargetAttributes = {
|
||||
847A58031C294F750028FB84 = {
|
||||
CreatedOnToolsVersion = 7.2;
|
||||
DevelopmentTeam = 34MUF9YXTA;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
};
|
||||
8498513B1C5639F9006FA400 = {
|
||||
CreatedOnToolsVersion = 7.2;
|
||||
TestTargetID = 847A58031C294F750028FB84;
|
||||
};
|
||||
8499D8841D0054A8004B5B37 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 847A57FF1C294F750028FB84 /* Build configuration list for PBXProject "FoldingCell" */;
|
||||
@@ -246,8 +314,9 @@
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
847A58031C294F750028FB84 /* FoldingCell */,
|
||||
847A58031C294F750028FB84 /* FoldingCellDemo */,
|
||||
8498513B1C5639F9006FA400 /* FoldingCellTests */,
|
||||
8499D8841D0054A8004B5B37 /* FoldingCell */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -280,6 +349,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D8831D0054A8004B5B37 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -303,14 +379,27 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D8801D0054A8004B5B37 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D8911D0054BF004B5B37 /* FoldingCell.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
849851421C5639F9006FA400 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 847A58031C294F750028FB84 /* FoldingCell */;
|
||||
target = 847A58031C294F750028FB84 /* FoldingCellDemo */;
|
||||
targetProxy = 849851411C5639F9006FA400 /* PBXContainerItemProxy */;
|
||||
};
|
||||
8499D88B1D0054A8004B5B37 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8499D8841D0054A8004B5B37 /* FoldingCell */;
|
||||
targetProxy = 8499D88A1D0054A8004B5B37 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
@@ -468,6 +557,52 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8499D88F1D0054A8004B5B37 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = FoldingCell/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCell;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8499D8901D0054A8004B5B37 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = FoldingCell/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.FoldingCell;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -480,7 +615,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
847A58161C294F750028FB84 /* Build configuration list for PBXNativeTarget "FoldingCell" */ = {
|
||||
847A58161C294F750028FB84 /* Build configuration list for PBXNativeTarget "FoldingCellDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
847A58171C294F750028FB84 /* Debug */,
|
||||
@@ -498,6 +633,14 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8499D88E1D0054A8004B5B37 /* Build configuration list for PBXNativeTarget "FoldingCell" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8499D88F1D0054A8004B5B37 /* Debug */,
|
||||
8499D8901D0054A8004B5B37 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 847A57FC1C294F750028FB84 /* Project object */;
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8498513B1C5639F9006FA400"
|
||||
BuildableName = "FoldingCellTests.xctest"
|
||||
BlueprintName = "FoldingCellTests"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
<LocationScenarioReference
|
||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||
referenceType = "1">
|
||||
</LocationScenarioReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,8 +14,8 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintIdentifier = "8499D8841D0054A8004B5B37"
|
||||
BuildableName = "FoldingCell.framework"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -28,26 +28,7 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8498513B1C5639F9006FA400"
|
||||
BuildableName = "FoldingCellTests.xctest"
|
||||
BlueprintName = "FoldingCellTests"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
@@ -61,16 +42,15 @@
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintIdentifier = "8499D8841D0054A8004B5B37"
|
||||
BuildableName = "FoldingCell.framework"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
@@ -80,16 +60,15 @@
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "847A58031C294F750028FB84"
|
||||
BuildableName = "FoldingCell.app"
|
||||
BlueprintIdentifier = "8499D8841D0054A8004B5B37"
|
||||
BuildableName = "FoldingCell.framework"
|
||||
BlueprintName = "FoldingCell"
|
||||
ReferencedContainer = "container:FoldingCell.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0cn-rv-Emg">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0cn-rv-Emg">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="OpenSans-Light.ttf">
|
||||
|
||||
@@ -21,8 +21,7 @@ class DemoCell: FoldingCell {
|
||||
|
||||
override func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval {
|
||||
|
||||
let durations = [0.33, 0.26, 0.26]
|
||||
|
||||
let durations = [0.26, 0.2, 0.2]
|
||||
return durations[itemIndex]
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// FoldingCell.h
|
||||
// FoldingCell
|
||||
//
|
||||
// Created by Alex K. on 02/06/16.
|
||||
// Copyright © 2016 Alex K. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for FoldingCell.
|
||||
FOUNDATION_EXPORT double FoldingCellVersionNumber;
|
||||
|
||||
//! Project version string for FoldingCell.
|
||||
FOUNDATION_EXPORT const unsigned char FoldingCellVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <FoldingCell/PublicHeader.h>
|
||||
|
||||
|
||||
@@ -23,463 +23,500 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// UITableViewCell with folding animation
|
||||
public class FoldingCell: UITableViewCell {
|
||||
|
||||
public typealias CompletionHandler = () -> Void
|
||||
|
||||
@IBOutlet weak var containerView: UIView!
|
||||
@IBOutlet weak var foregroundView: RotatedView!
|
||||
var animationView: UIView?
|
||||
|
||||
@IBInspectable var itemCount: NSInteger = 2 //count of folding
|
||||
|
||||
@IBInspectable var backViewColor: UIColor = UIColor.brownColor()
|
||||
|
||||
var animationItemViews: [RotatedView]?
|
||||
|
||||
public enum AnimationType {
|
||||
case Open
|
||||
case Close
|
||||
}
|
||||
|
||||
/// UIView whitch display when cell open
|
||||
@IBOutlet weak public var containerView: UIView!
|
||||
|
||||
/// UIView whitch display when cell close
|
||||
@IBOutlet weak public var foregroundView: RotatedView!
|
||||
var animationView: UIView?
|
||||
|
||||
/// the number of folding elements. Default 2
|
||||
@IBInspectable public var itemCount: NSInteger = 2
|
||||
|
||||
/// The color of the back cell
|
||||
@IBInspectable public var backViewColor: UIColor = UIColor.brownColor()
|
||||
|
||||
var animationItemViews: [RotatedView]?
|
||||
|
||||
/**
|
||||
Folding animation types
|
||||
|
||||
// MARK: life cicle
|
||||
- Open: Open direction
|
||||
- Close: Close direction
|
||||
*/
|
||||
public enum AnimationType {
|
||||
case Open
|
||||
case Close
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
|
||||
override public func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
override public func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
configureDefaultState()
|
||||
|
||||
self.selectionStyle = .None
|
||||
|
||||
containerView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
containerView.layer.masksToBounds = true
|
||||
configureDefaultState()
|
||||
|
||||
self.selectionStyle = .None
|
||||
|
||||
containerView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
containerView.layer.masksToBounds = true
|
||||
}
|
||||
|
||||
// MARK: configure
|
||||
|
||||
func configureDefaultState() {
|
||||
let foregroundTopConstraint = self.contentView.constraints.filter{ $0.identifier == "ForegroundViewTop"}.first
|
||||
let containerViewTopConstraint = self.contentView.constraints.filter{ $0.identifier == "ContainerViewTop"}.first
|
||||
|
||||
guard let foregroundConstraint = foregroundTopConstraint else {
|
||||
fatalError("set identifier")
|
||||
}
|
||||
|
||||
// MARK: configure
|
||||
|
||||
func configureDefaultState() {
|
||||
let foregroundTopConstraint = self.contentView.constraints.filter{ $0.identifier == "ForegroundViewTop"}.first
|
||||
let containerViewTopConstraint = self.contentView.constraints.filter{ $0.identifier == "ContainerViewTop"}.first
|
||||
|
||||
assert(foregroundTopConstraint != nil, "set identifier")
|
||||
assert(containerViewTopConstraint != nil, "set identifier")
|
||||
|
||||
containerViewTopConstraint!.constant = foregroundTopConstraint!.constant
|
||||
containerView.alpha = 0;
|
||||
|
||||
foregroundView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 1)
|
||||
foregroundTopConstraint!.constant += foregroundView.bounds.height / 2
|
||||
foregroundView.layer.transform = foregroundView.transform3d()
|
||||
|
||||
createAnimationView();
|
||||
self.contentView.bringSubviewToFront(foregroundView)
|
||||
guard let containerConstraint = containerViewTopConstraint else {
|
||||
fatalError("set identifier")
|
||||
}
|
||||
|
||||
func createAnimationItemView()->[RotatedView] {
|
||||
var items = [RotatedView]()
|
||||
items.append(foregroundView)
|
||||
var rotatedViews = [RotatedView]()
|
||||
for itemView in animationView!.subviews.filter({$0 is RotatedView}).sort({ $0.tag < $1.tag }) as! [RotatedView] {
|
||||
rotatedViews.append(itemView)
|
||||
if itemView.backView != nil {
|
||||
rotatedViews.append(itemView.backView!)
|
||||
}
|
||||
}
|
||||
items.appendContentsOf(rotatedViews)
|
||||
return items
|
||||
containerConstraint.constant = foregroundConstraint.constant
|
||||
containerView.alpha = 0;
|
||||
|
||||
foregroundView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 1)
|
||||
foregroundConstraint.constant += foregroundView.bounds.height / 2
|
||||
foregroundView.layer.transform = foregroundView.transform3d()
|
||||
|
||||
createAnimationView();
|
||||
self.contentView.bringSubviewToFront(foregroundView)
|
||||
}
|
||||
|
||||
func createAnimationItemView()->[RotatedView] {
|
||||
guard let animationView = self.animationView else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
func configureAnimationItems(animationType: AnimationType) {
|
||||
var items = [RotatedView]()
|
||||
items.append(foregroundView)
|
||||
var rotatedViews = [RotatedView]()
|
||||
for case let itemView as RotatedView in animationView.subviews.filter({$0 is RotatedView}).sort({ $0.tag < $1.tag }){
|
||||
rotatedViews.append(itemView)
|
||||
if let backView = itemView.backView {
|
||||
rotatedViews.append(backView)
|
||||
}
|
||||
}
|
||||
items.appendContentsOf(rotatedViews)
|
||||
return items
|
||||
}
|
||||
|
||||
func configureAnimationItems(animationType: AnimationType) {
|
||||
|
||||
guard let animationViewSuperView = animationView?.subviews else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
if animationType == .Open {
|
||||
for view in animationViewSuperView.filter({$0 is RotatedView}) {
|
||||
view.alpha = 0;
|
||||
}
|
||||
} else { // close
|
||||
for case let view as RotatedView in animationViewSuperView.filter({$0 is RotatedView}) {
|
||||
if animationType == .Open {
|
||||
for view in animationView!.subviews.filter({$0 is RotatedView}) {
|
||||
view.alpha = 0;
|
||||
}
|
||||
} else { // close
|
||||
for view: RotatedView in animationView!.subviews.filter({$0 is RotatedView}) as! [RotatedView] {
|
||||
if animationType == .Open {
|
||||
view.alpha = 0
|
||||
} else {
|
||||
view.alpha = 1
|
||||
view.backView?.alpha = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func createAnimationView() {
|
||||
|
||||
let anAnimationView = UIView(frame: containerView.frame)
|
||||
anAnimationView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
anAnimationView.backgroundColor = UIColor.clearColor()
|
||||
anAnimationView.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.contentView.addSubview(anAnimationView)
|
||||
|
||||
// copy constraints from containerView
|
||||
var newConstraints = [NSLayoutConstraint]()
|
||||
for constraint in self.contentView.constraints {
|
||||
if let item: UIView = constraint.firstItem as? UIView {
|
||||
if item == containerView {
|
||||
let newConstraint = NSLayoutConstraint(
|
||||
item: anAnimationView,
|
||||
attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation,
|
||||
toItem: constraint.secondItem,
|
||||
attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier,
|
||||
constant: constraint.constant)
|
||||
|
||||
newConstraints.append(newConstraint)
|
||||
} else if let item: UIView = constraint.secondItem as? UIView {
|
||||
if item == containerView {
|
||||
let newConstraint = NSLayoutConstraint(
|
||||
item: constraint.firstItem,
|
||||
attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation,
|
||||
toItem: anAnimationView,
|
||||
attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier,
|
||||
constant: constraint.constant)
|
||||
|
||||
newConstraints.append(newConstraint)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
self.contentView.addConstraints(newConstraints)
|
||||
|
||||
for constraint in containerView.constraints { // added height constraint
|
||||
if constraint.firstAttribute == .Height {
|
||||
let newConstraint = NSLayoutConstraint(
|
||||
item: anAnimationView,
|
||||
attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation,
|
||||
toItem: nil,
|
||||
attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier,
|
||||
constant: constraint.constant)
|
||||
|
||||
anAnimationView.addConstraint(newConstraint)
|
||||
}
|
||||
}
|
||||
|
||||
animationView = anAnimationView
|
||||
}
|
||||
|
||||
func addImageItemsToAnimationView() {
|
||||
containerView.alpha = 1;
|
||||
|
||||
// added first item
|
||||
var image = containerView.pb_takeSnapshot(CGRect(x: 0, y: 0, width: containerView.bounds.size.width, height: foregroundView.bounds.size.height))
|
||||
var imageView = UIImageView(image: image)
|
||||
imageView.tag = 0
|
||||
imageView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
animationView?.addSubview(imageView)
|
||||
|
||||
// added secod item
|
||||
|
||||
image = containerView.pb_takeSnapshot(
|
||||
CGRect(x: 0,
|
||||
y: foregroundView.bounds.size.height,
|
||||
width: containerView.bounds.size.width,
|
||||
height: foregroundView.bounds.size.height))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
rotatedView.tag = 1
|
||||
rotatedView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 0)
|
||||
rotatedView.layer.transform = rotatedView.transform3d()
|
||||
|
||||
rotatedView.addSubview(imageView)
|
||||
animationView?.addSubview(rotatedView)
|
||||
rotatedView.frame = CGRect(x: imageView.frame.origin.x,
|
||||
y: foregroundView.bounds.size.height,
|
||||
width: containerView.bounds.size.width,
|
||||
height: foregroundView.bounds.size.height)
|
||||
|
||||
// added other views
|
||||
let itemHeight = (containerView.bounds.size.height - 2 * foregroundView.bounds.size.height) / CGFloat(itemCount - 2)
|
||||
|
||||
if itemCount == 2 {
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(containerView.bounds.size.height - 2 * foregroundView.bounds.size.height == 0, "contanerView.height too high")
|
||||
}
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(containerView.bounds.size.height - 2 * foregroundView.bounds.size.height >= itemHeight, "contanerView.height too high")
|
||||
|
||||
var yPosition = 2 * foregroundView.bounds.size.height
|
||||
var tag = 2
|
||||
for var index = 2; index < itemCount; index++ {
|
||||
|
||||
image = containerView.pb_takeSnapshot(CGRect(x: 0, y: yPosition, width: containerView.bounds.size.width, height: itemHeight))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
|
||||
rotatedView.addSubview(imageView)
|
||||
rotatedView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 0)
|
||||
rotatedView.layer.transform = rotatedView.transform3d()
|
||||
animationView?.addSubview(rotatedView)
|
||||
rotatedView.frame = CGRect(x: 0, y: yPosition, width: rotatedView.bounds.size.width, height: itemHeight)
|
||||
rotatedView.tag = tag
|
||||
|
||||
yPosition += itemHeight
|
||||
tag++;
|
||||
}
|
||||
|
||||
containerView.alpha = 0;
|
||||
|
||||
// added back view
|
||||
var previusView: RotatedView?
|
||||
for contener in animationView!.subviews.sort({ $0.tag < $1.tag }) {
|
||||
if contener is RotatedView && contener.tag > 0 && contener.tag < animationView!.subviews.count {
|
||||
let rotatedView = contener as! RotatedView
|
||||
previusView?.addBackView(rotatedView.bounds.size.height, color: backViewColor)
|
||||
previusView = rotatedView
|
||||
}
|
||||
}
|
||||
|
||||
animationItemViews = createAnimationItemView()
|
||||
}
|
||||
|
||||
// MARK: public
|
||||
|
||||
public func selectedAnimation(isSelected: Bool, animated: Bool, completion: CompletionHandler?) {
|
||||
|
||||
if isSelected {
|
||||
|
||||
if animated {
|
||||
containerView.alpha = 0;
|
||||
openAnimation(completion: completion)
|
||||
} else {
|
||||
foregroundView.alpha = 0
|
||||
containerView.alpha = 1;
|
||||
}
|
||||
|
||||
view.alpha = 0
|
||||
} else {
|
||||
if animated {
|
||||
closeAnimation(completion: completion)
|
||||
} else {
|
||||
foregroundView.alpha = 1;
|
||||
containerView.alpha = 0;
|
||||
}
|
||||
view.alpha = 1
|
||||
view.backView?.alpha = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func createAnimationView() {
|
||||
|
||||
let anAnimationView = UIView(frame: containerView.frame)
|
||||
anAnimationView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
anAnimationView.backgroundColor = UIColor.clearColor()
|
||||
anAnimationView.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.contentView.addSubview(anAnimationView)
|
||||
|
||||
// copy constraints from containerView
|
||||
var newConstraints = [NSLayoutConstraint]()
|
||||
for constraint in self.contentView.constraints {
|
||||
if let item = constraint.firstItem as? UIView where item == containerView {
|
||||
let newConstraint = NSLayoutConstraint( item: anAnimationView, attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation, toItem: constraint.secondItem, attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier, constant: constraint.constant)
|
||||
|
||||
newConstraints.append(newConstraint)
|
||||
} else if let item: UIView = constraint.secondItem as? UIView where item == containerView {
|
||||
let newConstraint = NSLayoutConstraint(item: constraint.firstItem, attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation, toItem: anAnimationView, attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier, constant: constraint.constant)
|
||||
|
||||
newConstraints.append(newConstraint)
|
||||
}
|
||||
}
|
||||
self.contentView.addConstraints(newConstraints)
|
||||
|
||||
for constraint in containerView.constraints { // added height constraint
|
||||
if constraint.firstAttribute == .Height {
|
||||
let newConstraint = NSLayoutConstraint(item: anAnimationView, attribute: constraint.firstAttribute,
|
||||
relatedBy: constraint.relation, toItem: nil, attribute: constraint.secondAttribute,
|
||||
multiplier: constraint.multiplier, constant: constraint.constant)
|
||||
|
||||
anAnimationView.addConstraint(newConstraint)
|
||||
}
|
||||
}
|
||||
animationView = anAnimationView
|
||||
}
|
||||
|
||||
|
||||
func addImageItemsToAnimationView() {
|
||||
containerView.alpha = 1;
|
||||
let contSize = containerView.bounds.size
|
||||
let forgSize = foregroundView.bounds.size
|
||||
|
||||
// added first item
|
||||
var image = containerView.pb_takeSnapshot(CGRect(x: 0, y: 0, width: contSize.width, height: forgSize.height))
|
||||
var imageView = UIImageView(image: image)
|
||||
imageView.tag = 0
|
||||
imageView.layer.cornerRadius = foregroundView.layer.cornerRadius
|
||||
animationView?.addSubview(imageView)
|
||||
|
||||
// added secod item
|
||||
image = containerView.pb_takeSnapshot(CGRect(x: 0, y: forgSize.height, width: contSize.width, height: forgSize.height))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
rotatedView.tag = 1
|
||||
rotatedView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 0)
|
||||
rotatedView.layer.transform = rotatedView.transform3d()
|
||||
|
||||
rotatedView.addSubview(imageView)
|
||||
animationView?.addSubview(rotatedView)
|
||||
rotatedView.frame = CGRect(x: imageView.frame.origin.x, y: forgSize.height, width: contSize.width, height: forgSize.height)
|
||||
|
||||
// added other views
|
||||
let itemHeight = (contSize.height - 2 * forgSize.height) / CGFloat(itemCount - 2)
|
||||
|
||||
if itemCount == 2 {
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height == 0, "contanerView.height too high")
|
||||
}
|
||||
// decrease containerView height or increase itemCount
|
||||
assert(contSize.height - 2 * forgSize.height >= itemHeight, "contanerView.height too high")
|
||||
|
||||
var yPosition = 2 * forgSize.height
|
||||
var tag = 2
|
||||
for _ in 2..<itemCount {
|
||||
image = containerView.pb_takeSnapshot(CGRect(x: 0, y: yPosition, width: contSize.width, height: itemHeight))
|
||||
|
||||
imageView = UIImageView(image: image)
|
||||
let rotatedView = RotatedView(frame: imageView.frame)
|
||||
|
||||
rotatedView.addSubview(imageView)
|
||||
rotatedView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 0)
|
||||
rotatedView.layer.transform = rotatedView.transform3d()
|
||||
animationView?.addSubview(rotatedView)
|
||||
rotatedView.frame = CGRect(x: 0, y: yPosition, width: rotatedView.bounds.size.width, height: itemHeight)
|
||||
rotatedView.tag = tag
|
||||
|
||||
yPosition += itemHeight
|
||||
tag += 1;
|
||||
}
|
||||
|
||||
public func isAnimating()->Bool {
|
||||
guard animationItemViews != nil
|
||||
else {
|
||||
return false
|
||||
}
|
||||
|
||||
for item in animationItemViews! {
|
||||
if item.layer.animationKeys()?.count > 0 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
if animationView?.alpha == 1 {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
containerView.alpha = 0;
|
||||
|
||||
if let animationView = self.animationView {
|
||||
// added back view
|
||||
var previusView: RotatedView?
|
||||
for case let contener as RotatedView in animationView.subviews.sort({ $0.tag < $1.tag })
|
||||
where contener.tag > 0 && contener.tag < animationView.subviews.count {
|
||||
previusView?.addBackView(contener.bounds.size.height, color: backViewColor)
|
||||
previusView = contener
|
||||
}
|
||||
}
|
||||
animationItemViews = createAnimationItemView()
|
||||
}
|
||||
|
||||
private func removeImageItemsFromAnimationView() {
|
||||
|
||||
|
||||
// MARK: animations
|
||||
|
||||
public func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval {
|
||||
assert(false, "added this method to cell")
|
||||
return 0
|
||||
guard let animationView = self.animationView else {
|
||||
return
|
||||
}
|
||||
|
||||
animationView.subviews.forEach({ $0.removeFromSuperview() })
|
||||
}
|
||||
|
||||
|
||||
// MARK: public
|
||||
|
||||
/**
|
||||
Open or close cell
|
||||
|
||||
- parameter isSelected: Specify true if you want to open cell or false if you close cell.
|
||||
- parameter animated: Specify true if you want to animate the change in visibility or false if you want immediately.
|
||||
- parameter completion: A block object to be executed when the animation sequence ends.
|
||||
*/
|
||||
public func selectedAnimation(isSelected: Bool, animated: Bool, completion: (Void -> Void)?) {
|
||||
|
||||
func durationSequence(type: AnimationType)-> [NSTimeInterval] {
|
||||
var durations = [NSTimeInterval]()
|
||||
for var index = 0; index < itemCount-1; index++ {
|
||||
let duration = animationDuration(index, type: .Open)
|
||||
durations.append(NSTimeInterval(duration / 2.0))
|
||||
durations.append(NSTimeInterval(duration / 2.0))
|
||||
}
|
||||
return durations
|
||||
}
|
||||
|
||||
func openAnimation(completion completion: CompletionHandler?) {
|
||||
|
||||
if animationView?.subviews.count == 0 { // added animation items if need
|
||||
addImageItemsToAnimationView()
|
||||
}
|
||||
|
||||
animationView?.alpha = 1;
|
||||
if isSelected {
|
||||
|
||||
if animated {
|
||||
containerView.alpha = 0;
|
||||
|
||||
let durations = durationSequence(.Open)
|
||||
|
||||
var delay: NSTimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var from: CGFloat = 0.0;
|
||||
var to: CGFloat = CGFloat(-M_PI / 2)
|
||||
var hidden = true
|
||||
configureAnimationItems(.Open)
|
||||
for var index = 0; index < animationItemViews?.count; index++ {
|
||||
let animatedView = animationItemViews![index]
|
||||
|
||||
animatedView.foldingAnimation(timing, from: from, to: to, duration: durations[index], delay: delay, hidden: hidden)
|
||||
|
||||
from = from == 0.0 ? CGFloat(M_PI / 2) : 0.0;
|
||||
to = to == 0.0 ? CGFloat(-M_PI / 2) : 0.0;
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn;
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
|
||||
let firstItemView = animationView!.subviews.filter{$0.tag == 0}.first
|
||||
firstItemView!.layer.masksToBounds = true
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(durations[0] * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
firstItemView!.layer.cornerRadius = 0
|
||||
}
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
self.animationView?.alpha = 0
|
||||
self.containerView.alpha = 1
|
||||
completion?()
|
||||
}
|
||||
openAnimation(completion: completion)
|
||||
} else {
|
||||
foregroundView.alpha = 0
|
||||
containerView.alpha = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
if animated {
|
||||
closeAnimation(completion: completion)
|
||||
} else {
|
||||
foregroundView.alpha = 1;
|
||||
containerView.alpha = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func isAnimating()->Bool {
|
||||
guard let animationItemViews = self.animationItemViews else {
|
||||
return false
|
||||
}
|
||||
|
||||
func closeAnimation(completion completion: CompletionHandler?) {
|
||||
|
||||
if animationView?.subviews.count == 0 { // added animation items if need
|
||||
addImageItemsToAnimationView()
|
||||
}
|
||||
|
||||
animationView?.alpha = 1;
|
||||
containerView.alpha = 0;
|
||||
|
||||
var durations = durationSequence(.Close)
|
||||
durations = durations.reverse()
|
||||
|
||||
var delay: NSTimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var from: CGFloat = 0.0;
|
||||
var to: CGFloat = CGFloat(M_PI / 2)
|
||||
var hidden = true
|
||||
configureAnimationItems(.Close)
|
||||
for var index = 0; index < animationItemViews?.count; index++ {
|
||||
let animatedView = animationItemViews?.reverse()[index]
|
||||
|
||||
animatedView!.foldingAnimation(timing, from: from, to: to, duration: durations[index], delay: delay, hidden: hidden)
|
||||
|
||||
to = to == 0.0 ? CGFloat(M_PI / 2) : 0.0;
|
||||
from = from == 0.0 ? CGFloat(-M_PI / 2) : 0.0;
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn;
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
self.animationView!.alpha = 0
|
||||
completion?()
|
||||
}
|
||||
|
||||
let firstItemView = animationView!.subviews.filter{$0.tag == 0}.first
|
||||
firstItemView!.layer.masksToBounds = false
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64((delay - durations.last! * 1.5) * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
firstItemView!.layer.cornerRadius = self.foregroundView.layer.cornerRadius
|
||||
}
|
||||
for item in animationItemViews {
|
||||
if item.layer.animationKeys()?.count > 0 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
if animationView?.alpha == 1 {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
// MARK: animations
|
||||
|
||||
public func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval {
|
||||
assert(false, "added this method to cell")
|
||||
return 0
|
||||
}
|
||||
|
||||
func durationSequence(type: AnimationType)-> [NSTimeInterval] {
|
||||
var durations = [NSTimeInterval]()
|
||||
for index in 0..<itemCount-1 {
|
||||
let duration = animationDuration(index, type: .Open)
|
||||
durations.append(NSTimeInterval(duration / 2.0))
|
||||
durations.append(NSTimeInterval(duration / 2.0))
|
||||
}
|
||||
return durations
|
||||
}
|
||||
|
||||
func openAnimation(completion completion: (Void -> Void)?) {
|
||||
|
||||
removeImageItemsFromAnimationView()
|
||||
addImageItemsToAnimationView()
|
||||
|
||||
guard let animationView = self.animationView else {
|
||||
return
|
||||
}
|
||||
|
||||
animationView.alpha = 1;
|
||||
containerView.alpha = 0;
|
||||
|
||||
let durations = durationSequence(.Open)
|
||||
|
||||
var delay: NSTimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var from: CGFloat = 0.0;
|
||||
var to: CGFloat = CGFloat(-M_PI / 2)
|
||||
var hidden = true
|
||||
configureAnimationItems(.Open)
|
||||
|
||||
guard let animationItemViews = self.animationItemViews else {
|
||||
return
|
||||
}
|
||||
|
||||
for index in 0..<animationItemViews.count {
|
||||
let animatedView = animationItemViews[index]
|
||||
|
||||
animatedView.foldingAnimation(timing, from: from, to: to, duration: durations[index], delay: delay, hidden: hidden)
|
||||
|
||||
from = from == 0.0 ? CGFloat(M_PI / 2) : 0.0;
|
||||
to = to == 0.0 ? CGFloat(-M_PI / 2) : 0.0;
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn;
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
|
||||
let firstItemView = animationView.subviews.filter{$0.tag == 0}.first
|
||||
|
||||
if let first = firstItemView {
|
||||
first.layer.masksToBounds = true
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(durations[0] * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
first.layer.cornerRadius = 0
|
||||
}
|
||||
}
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
self.animationView?.alpha = 0
|
||||
self.containerView.alpha = 1
|
||||
completion?()
|
||||
}
|
||||
}
|
||||
|
||||
func closeAnimation(completion completion: (Void -> Void)?) {
|
||||
|
||||
removeImageItemsFromAnimationView()
|
||||
addImageItemsToAnimationView()
|
||||
|
||||
guard let animationItemViews = self.animationItemViews else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
animationView?.alpha = 1;
|
||||
containerView.alpha = 0;
|
||||
|
||||
var durations: [NSTimeInterval] = durationSequence(.Close).reverse()
|
||||
|
||||
var delay: NSTimeInterval = 0
|
||||
var timing = kCAMediaTimingFunctionEaseIn
|
||||
var from: CGFloat = 0.0;
|
||||
var to: CGFloat = CGFloat(M_PI / 2)
|
||||
var hidden = true
|
||||
configureAnimationItems(.Close)
|
||||
|
||||
if durations.count < animationItemViews.count {
|
||||
fatalError("wrong override func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval")
|
||||
}
|
||||
for index in 0..<animationItemViews.count {
|
||||
let animatedView = animationItemViews.reverse()[index]
|
||||
|
||||
animatedView.foldingAnimation(timing, from: from, to: to, duration: durations[index], delay: delay, hidden: hidden)
|
||||
|
||||
to = to == 0.0 ? CGFloat(M_PI / 2) : 0.0;
|
||||
from = from == 0.0 ? CGFloat(-M_PI / 2) : 0.0;
|
||||
timing = timing == kCAMediaTimingFunctionEaseIn ? kCAMediaTimingFunctionEaseOut : kCAMediaTimingFunctionEaseIn;
|
||||
hidden = !hidden
|
||||
delay += durations[index]
|
||||
}
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
if let animationView = self.animationView {
|
||||
animationView.alpha = 0
|
||||
}
|
||||
completion?()
|
||||
}
|
||||
|
||||
if let animationView = self.animationView {
|
||||
let firstItemView = animationView.subviews.filter{$0.tag == 0}.first
|
||||
firstItemView?.layer.cornerRadius = 0
|
||||
if let durationLast = durations.last {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64((delay - durationLast - durationLast / 2.0) * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
|
||||
firstItemView?.layer.cornerRadius = self.foregroundView.layer.cornerRadius
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: RotatedView
|
||||
|
||||
public class RotatedView: UIView {
|
||||
var hiddenAfterAnimation = false
|
||||
var backView: RotatedView?
|
||||
var hiddenAfterAnimation = false
|
||||
var backView: RotatedView?
|
||||
|
||||
func addBackView(height: CGFloat, color:UIColor) {
|
||||
let view = RotatedView(frame: CGRect.zero)
|
||||
view.backgroundColor = color
|
||||
view.layer.anchorPoint = CGPoint.init(x: 0.5, y: 1)
|
||||
view.layer.transform = view.transform3d()
|
||||
view.translatesAutoresizingMaskIntoConstraints = false;
|
||||
self.addSubview(view)
|
||||
backView = view
|
||||
|
||||
func addBackView(height: CGFloat, color:UIColor) {
|
||||
let view = RotatedView(frame: CGRect.zero)
|
||||
view.backgroundColor = color
|
||||
view.layer.anchorPoint = CGPoint.init(x: 0.5, y: 1)
|
||||
view.layer.transform = view.transform3d()
|
||||
view.translatesAutoresizingMaskIntoConstraints = false;
|
||||
self.addSubview(view)
|
||||
backView = view
|
||||
|
||||
view.addConstraint(NSLayoutConstraint(item: view,
|
||||
attribute: .Height,
|
||||
relatedBy: .Equal,
|
||||
toItem: nil,
|
||||
attribute: .Height,
|
||||
multiplier: 1,
|
||||
constant: height))
|
||||
|
||||
self.addConstraints([
|
||||
NSLayoutConstraint(item: view, attribute: .Top, relatedBy: .Equal, toItem: self, attribute: .Top, multiplier: 1, constant: self.bounds.size.height - height + height / 2),
|
||||
NSLayoutConstraint(item: view, attribute: .Leading, relatedBy: .Equal, toItem: self, attribute: .Leading, multiplier: 1, constant: 0),
|
||||
NSLayoutConstraint(item: view, attribute: .Trailing, relatedBy: .Equal, toItem: self, attribute: .Trailing, multiplier: 1, constant: 0)
|
||||
])
|
||||
}
|
||||
view.addConstraint(NSLayoutConstraint(item: view, attribute: .Height, relatedBy: .Equal, toItem: nil,attribute: .Height,
|
||||
multiplier: 1, constant: height))
|
||||
|
||||
self.addConstraints([
|
||||
NSLayoutConstraint(item: view, attribute: .Top, relatedBy: .Equal, toItem: self, attribute: .Top, multiplier: 1,
|
||||
constant: self.bounds.size.height - height + height / 2),
|
||||
NSLayoutConstraint(item: view, attribute: .Leading, relatedBy: .Equal, toItem: self, attribute: .Leading,
|
||||
multiplier: 1, constant: 0),
|
||||
NSLayoutConstraint(item: view, attribute: .Trailing, relatedBy: .Equal, toItem: self, attribute: .Trailing,
|
||||
multiplier: 1, constant: 0)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension RotatedView {
|
||||
|
||||
func rotatedX(angle : CGFloat) {
|
||||
var allTransofrom = CATransform3DIdentity;
|
||||
let rotateTransform = CATransform3DMakeRotation(angle, 1, 0, 0)
|
||||
allTransofrom = CATransform3DConcat(allTransofrom, rotateTransform)
|
||||
allTransofrom = CATransform3DConcat(allTransofrom, transform3d())
|
||||
self.layer.transform = allTransofrom
|
||||
}
|
||||
|
||||
func transform3d() -> CATransform3D {
|
||||
var transform = CATransform3DIdentity
|
||||
transform.m34 = 2.5 / -2000;
|
||||
return transform
|
||||
}
|
||||
|
||||
// MARK: animations
|
||||
|
||||
func foldingAnimation(timing: String, from: CGFloat, to: CGFloat, duration: NSTimeInterval, delay:NSTimeInterval, hidden:Bool) {
|
||||
|
||||
func rotatedX(angle : CGFloat) {
|
||||
var allTransofrom = CATransform3DIdentity;
|
||||
let rotateTransform = CATransform3DMakeRotation(angle, 1, 0, 0)
|
||||
allTransofrom = CATransform3DConcat(allTransofrom, rotateTransform)
|
||||
allTransofrom = CATransform3DConcat(allTransofrom, transform3d())
|
||||
self.layer.transform = allTransofrom
|
||||
}
|
||||
let rotateAnimation = CABasicAnimation(keyPath: "transform.rotation.x")
|
||||
rotateAnimation.timingFunction = CAMediaTimingFunction(name: timing)
|
||||
rotateAnimation.fromValue = (from)
|
||||
rotateAnimation.toValue = (to)
|
||||
rotateAnimation.duration = duration
|
||||
rotateAnimation.delegate = self;
|
||||
rotateAnimation.fillMode = kCAFillModeForwards
|
||||
rotateAnimation.removedOnCompletion = false;
|
||||
rotateAnimation.beginTime = CACurrentMediaTime() + delay
|
||||
|
||||
func transform3d()-> CATransform3D {
|
||||
var transform = CATransform3DIdentity
|
||||
transform.m34 = 2.5 / -2000;
|
||||
return transform
|
||||
}
|
||||
self.hiddenAfterAnimation = hidden
|
||||
|
||||
// MARK: animations
|
||||
|
||||
func foldingAnimation(timing: String, from: CGFloat, to: CGFloat, duration: NSTimeInterval, delay:NSTimeInterval, hidden:Bool) {
|
||||
|
||||
let rotateAnimation = CABasicAnimation(keyPath: "transform.rotation.x")
|
||||
rotateAnimation.timingFunction = CAMediaTimingFunction(name: timing)
|
||||
rotateAnimation.fromValue = (from)
|
||||
rotateAnimation.toValue = (to)
|
||||
rotateAnimation.duration = duration
|
||||
rotateAnimation.delegate = self;
|
||||
rotateAnimation.fillMode = kCAFillModeForwards;
|
||||
rotateAnimation.removedOnCompletion = false;
|
||||
rotateAnimation.beginTime = CACurrentMediaTime() + delay
|
||||
|
||||
self.hiddenAfterAnimation = hidden
|
||||
|
||||
self.layer.addAnimation(rotateAnimation, forKey: "rotation.x")
|
||||
}
|
||||
|
||||
override public func animationDidStart(anim: CAAnimation) {
|
||||
self.layer.shouldRasterize = true
|
||||
self.alpha = 1
|
||||
}
|
||||
|
||||
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
|
||||
if hiddenAfterAnimation {
|
||||
self.alpha = 0
|
||||
}
|
||||
self.layer.removeAllAnimations()
|
||||
self.layer.shouldRasterize = false
|
||||
self.rotatedX(CGFloat(0))
|
||||
self.layer.addAnimation(rotateAnimation, forKey: "rotation.x")
|
||||
}
|
||||
|
||||
override public func animationDidStart(anim: CAAnimation) {
|
||||
self.layer.shouldRasterize = true
|
||||
self.alpha = 1
|
||||
}
|
||||
|
||||
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
|
||||
if hiddenAfterAnimation {
|
||||
self.alpha = 0
|
||||
}
|
||||
self.layer.removeAllAnimations()
|
||||
self.layer.shouldRasterize = false
|
||||
self.rotatedX(CGFloat(0))
|
||||
}
|
||||
}
|
||||
|
||||
extension UIView {
|
||||
func pb_takeSnapshot(frame: CGRect) -> UIImage {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0);
|
||||
|
||||
let context = UIGraphicsGetCurrentContext();
|
||||
CGContextTranslateCTM(context, frame.origin.x * -1, frame.origin.y * -1);
|
||||
|
||||
self.layer.renderInContext(UIGraphicsGetCurrentContext()!);
|
||||
let image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
return image
|
||||
func pb_takeSnapshot(frame: CGRect) -> UIImage? {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
|
||||
|
||||
let context = UIGraphicsGetCurrentContext();
|
||||
CGContextTranslateCTM(context, frame.origin.x * -1, frame.origin.y * -1)
|
||||
|
||||
guard let currentContext = UIGraphicsGetCurrentContext() else {
|
||||
return nil
|
||||
}
|
||||
|
||||
self.layer.renderInContext(currentContext)
|
||||
let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||
UIGraphicsEndImageContext()
|
||||
|
||||
return image
|
||||
}
|
||||
}
|
||||
@@ -13,26 +13,18 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -94,7 +94,7 @@ class MainTableViewController: UITableViewController {
|
||||
} else {// close cell
|
||||
cellHeights[indexPath.row] = kCloseCellHeight
|
||||
cell.selectedAnimation(false, animated: true, completion: nil)
|
||||
duration = 1.1
|
||||
duration = 0.8
|
||||
}
|
||||
|
||||
UIView.animateWithDuration(duration, delay: 0, options: .CurveEaseOut, animations: { () -> Void in
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||

|
||||
# FoldingCell
|
||||
[](https://cocoapods.org/pods/FoldingCell)
|
||||
[](http://cocoapods.org/pods/FoldingCell)
|
||||
[](https://cdn.rawgit.com/Ramotion/folding-cell/master/docs/index.html)
|
||||
[](https://github.com/Ramotion/folding-cell)
|
||||
[](http://twitter.com/Ramotion)
|
||||
[](https://travis-ci.org/Ramotion/folding-cell)
|
||||
[](https://codebeat.co/projects/github-com-ramotion-folding-cell)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
|
||||
[shot on dribbble](https://dribbble.com/shots/2121350-Delivery-Card):
|
||||

|
||||
|
||||
|
||||
The [iPhone mockup](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell) available [here](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=folding-cell).
|
||||
## Requirements
|
||||
|
||||
- iOS 8.0+
|
||||
- Xcode 7.2
|
||||
- Xcode 7.3
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -18,9 +25,13 @@ Just add the FoldingCell.swift file to your project.
|
||||
|
||||
or use [CocoaPods](https://cocoapods.org) with Podfile:
|
||||
``` ruby
|
||||
pod 'FoldingCell', '~> 0.3'
|
||||
pod 'FoldingCell', '~> 0.8.1'
|
||||
```
|
||||
|
||||
or [Carthage](https://github.com/Carthage/Carthage) users can simply add Mantle to their `Cartfile`:
|
||||
```
|
||||
github "Ramotion/folding-cell"
|
||||
```
|
||||
|
||||
|
||||
## Solution
|
||||

|
||||
@@ -30,7 +41,7 @@ pod 'FoldingCell', '~> 0.3'
|
||||
|
||||
2) Add a UIView to your cell in your storyboard or nib file, inheriting from `RotatedView`.
|
||||
Connect the outlet from this view to the cell property `foregroundView`.
|
||||
Add constraints from this view to the superview, as in this picture:
|
||||
Add constraints from this view to the superview, as in this picture:
|
||||

|
||||
|
||||
(constants of constraints may be different). Add the identifier `ForegroundViewTop`
|
||||
@@ -47,7 +58,9 @@ property `containerView`. Add constraints from this view to the superview like i
|
||||
Your result should be something like this picture:
|
||||

|
||||
|
||||
4) Set ``` @IBInspectable var itemCount: NSInteger ``` property is a count of folding (it IBInspectable you can set in storyborad). range 2 or greater. Default value is 2
|
||||
[Demonstration adding constraints for foregroundView, containerView](https://vimeo.com/154954299)
|
||||
|
||||
4) Set ``` @IBInspectable var itemCount: NSInteger ``` property is a count of folding (it IBInspectable you can set in storyboard). range 2 or greater. Default value is 2
|
||||
|
||||
Ok, we've finished configuring the cell.
|
||||
|
||||
@@ -118,7 +131,7 @@ Ok, we've finished configuring the cell.
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
6) Add this code to your new cell class
|
||||
``` swift
|
||||
@@ -132,7 +145,7 @@ Ok, we've finished configuring the cell.
|
||||
|
||||
## Licence
|
||||
|
||||
Adaptive tab bar is released under the MIT license.
|
||||
Folding cell is released under the MIT license.
|
||||
See [LICENSE](./LICENSE) for details.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Classes Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C15FoldingCellDemo11FoldingCell"></a>
|
||||
<a name="//apple_ref/swift/Class/FoldingCell" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C15FoldingCellDemo11FoldingCell">FoldingCell</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UITableViewCell with folding animation</p>
|
||||
|
||||
<a href="Classes/FoldingCell.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">FoldingCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,292 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FoldingCell Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/swift/Class/FoldingCell" class="dashAnchor"></a>
|
||||
<a title="FoldingCell Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
FoldingCell Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>FoldingCell</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">FoldingCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>UITableViewCell with folding animation</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell13containerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/containerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell13containerViewXwGSQCSo6UIView_">containerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIView whitch display when cell open</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBOutlet</span> <span class="k">weak</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">containerView</span><span class="p">:</span> <span class="kt">UIView</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell14foregroundViewXwGSQCS_11RotatedView_"></a>
|
||||
<a name="//apple_ref/swift/Property/foregroundView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell14foregroundViewXwGSQCS_11RotatedView_">foregroundView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIView whitch display when cell close</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBOutlet</span> <span class="k">weak</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundView</span><span class="p">:</span> <span class="kt">RotatedView</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell9itemCountSi"></a>
|
||||
<a name="//apple_ref/swift/Property/itemCount" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell9itemCountSi">itemCount</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>the number of folding elements. Default 2</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">itemCount</span><span class="p">:</span> <span class="kt">NSInteger</span> <span class="o">=</span> <span class="mi">2</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell13backViewColorCSo7UIColor"></a>
|
||||
<a name="//apple_ref/swift/Property/backViewColor" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell13backViewColorCSo7UIColor">backViewColor</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The color of the back cell</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">backViewColor</span><span class="p">:</span> <span class="kt">UIColor</span> <span class="o">=</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">brownColor</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:OC15FoldingCellDemo11FoldingCell13AnimationType"></a>
|
||||
<a name="//apple_ref/swift/Enum/AnimationType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:OC15FoldingCellDemo11FoldingCell13AnimationType">AnimationType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Folding animation types</p>
|
||||
|
||||
<ul>
|
||||
<li>Open: Open direction</li>
|
||||
<li>Close: Close direction</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AnimationType</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/public"></a>
|
||||
<a name="//apple_ref/swift/Section/public" class="dashAnchor"></a>
|
||||
<a href="#/public">
|
||||
<h3 class="section-name">public</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC15FoldingCellDemo11FoldingCell17selectedAnimationFTSb8animatedSb10completionGSqFT_T___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/selectedAnimation(_:animated:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC15FoldingCellDemo11FoldingCell17selectedAnimationFTSb8animatedSb10completionGSqFT_T___T_">selectedAnimation(_:animated:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Open or close cell</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">selectedAnimation</span><span class="p">(</span><span class="nv">isSelected</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(</span><span class="kt">Void</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>isSelected</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Specify true if you want to open cell or false if you close cell.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>animated</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Specify true if you want to animate the change in visibility or false if you want immediately.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A block object to be executed when the animation sequence ends.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
@@ -0,0 +1,331 @@
|
||||
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline; }
|
||||
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
font-family: Helvetica, freesans, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
word-wrap: break-word; }
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: 100;
|
||||
color: black; }
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em; }
|
||||
|
||||
h2 {
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #e2e2e2; }
|
||||
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin-top: 21px; }
|
||||
|
||||
h5 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1.1em;
|
||||
color: #777; }
|
||||
|
||||
.section-name {
|
||||
color: gray;
|
||||
display: block;
|
||||
font-family: Helvetica;
|
||||
font-size: 22px;
|
||||
font-weight: 100;
|
||||
margin-bottom: 15px; }
|
||||
|
||||
pre, code {
|
||||
font: 0.95em Menlo, monospace;
|
||||
color: #777;
|
||||
word-wrap: normal; }
|
||||
|
||||
p code, li code {
|
||||
background-color: #eee;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px; }
|
||||
|
||||
a {
|
||||
color: #0088cc;
|
||||
text-decoration: none; }
|
||||
|
||||
ul {
|
||||
padding-left: 15px; }
|
||||
|
||||
li {
|
||||
line-height: 1.8em; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
padding: 0 10px;
|
||||
border-left: 4px solid #ccc; }
|
||||
|
||||
.content-wrapper {
|
||||
margin: 0 auto;
|
||||
width: 980px; }
|
||||
|
||||
header {
|
||||
font-size: 0.85em;
|
||||
line-height: 26px;
|
||||
background-color: #414141;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1; }
|
||||
header img {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
header a {
|
||||
color: #fff; }
|
||||
header p {
|
||||
float: left;
|
||||
color: #999; }
|
||||
header .header-right {
|
||||
float: right;
|
||||
margin-left: 16px; }
|
||||
|
||||
#breadcrumbs {
|
||||
background-color: #f2f2f2;
|
||||
height: 27px;
|
||||
padding-top: 17px;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
margin-top: 26px; }
|
||||
#breadcrumbs #carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.sidebar {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e2e2e2;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
width: 230px;
|
||||
word-wrap: normal; }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
background: #fff;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
font-size: 1.1em;
|
||||
font-weight: 100;
|
||||
padding: 15px 0 15px 20px; }
|
||||
.nav-group-name > a {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin-top: 5px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 0.9em;
|
||||
list-style-type: none; }
|
||||
.nav-group-task a {
|
||||
color: #888; }
|
||||
|
||||
.main-content {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin-left: 246px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
top: 70px;
|
||||
width: 734px; }
|
||||
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
|
||||
margin-bottom: 1em; }
|
||||
.main-content p {
|
||||
line-height: 1.8em; }
|
||||
.main-content section .section:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.main-content section .task-group-section .task-group:first-of-type {
|
||||
padding-top: 10px; }
|
||||
.main-content section .task-group-section .task-group:first-of-type .section-name {
|
||||
padding-top: 15px; }
|
||||
|
||||
.section {
|
||||
padding: 0 25px; }
|
||||
|
||||
.highlight {
|
||||
background-color: #eee;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 0 40px 40px 0;
|
||||
margin-bottom: -25px;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.section-name {
|
||||
margin: 0;
|
||||
margin-left: 18px; }
|
||||
|
||||
.task-group-section {
|
||||
padding-left: 6px;
|
||||
border-top: 1px solid #e2e2e2; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
.item code {
|
||||
background-color: transparent;
|
||||
padding: 0; }
|
||||
.item .token {
|
||||
padding-left: 3px;
|
||||
margin-left: 15px;
|
||||
font-size: 11.9px; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: gray;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
background: #f9f9f9;
|
||||
border-left: 1px solid #e2e2e2;
|
||||
border-top: 1px solid #e2e2e2;
|
||||
height: 12px;
|
||||
left: 21px;
|
||||
top: -7px;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
width: 12px; }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
left: -25px;
|
||||
padding: 0 25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #f9f9f9;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4b8afb; }
|
||||
|
||||
.aside-warning {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
#footer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
margin-left: 25px; }
|
||||
#footer p {
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
font-size: 0.8em; }
|
||||
|
||||
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
|
||||
display: none; }
|
||||
html.dash .main-content {
|
||||
width: 980px;
|
||||
margin-left: 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
padding-bottom: 0; }
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
html.dash .item .token {
|
||||
margin-left: 0; }
|
||||
html.dash .content-wrapper {
|
||||
width: auto; }
|
||||
html.dash #footer {
|
||||
position: static; }
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.jazzy.foldingcelldemo</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FoldingCellDemo</string>
|
||||
<key>DocSetPlatformFamily</key>
|
||||
<string>jazzy</string>
|
||||
<key>isDashDocset</key>
|
||||
<true/>
|
||||
<key>dashIndexFilePath</key>
|
||||
<string>index.html</string>
|
||||
<key>isJavaScriptEnabled</key>
|
||||
<true/>
|
||||
<key>DashDocSetFamily</key>
|
||||
<string>dashtoc</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Classes Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="Classes Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
Classes Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>Classes</h1>
|
||||
<p>The following classes are available globally.</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C15FoldingCellDemo11FoldingCell"></a>
|
||||
<a name="//apple_ref/swift/Class/FoldingCell" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C15FoldingCellDemo11FoldingCell">FoldingCell</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UITableViewCell with folding animation</p>
|
||||
|
||||
<a href="Classes/FoldingCell.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">FoldingCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,292 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FoldingCell Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a name="//apple_ref/swift/Class/FoldingCell" class="dashAnchor"></a>
|
||||
<a title="FoldingCell Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
FoldingCell Class Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>FoldingCell</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">FoldingCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>UITableViewCell with folding animation</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell13containerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/containerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell13containerViewXwGSQCSo6UIView_">containerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIView whitch display when cell open</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBOutlet</span> <span class="k">weak</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">containerView</span><span class="p">:</span> <span class="kt">UIView</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell14foregroundViewXwGSQCS_11RotatedView_"></a>
|
||||
<a name="//apple_ref/swift/Property/foregroundView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell14foregroundViewXwGSQCS_11RotatedView_">foregroundView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIView whitch display when cell close</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBOutlet</span> <span class="k">weak</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundView</span><span class="p">:</span> <span class="kt">RotatedView</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell9itemCountSi"></a>
|
||||
<a name="//apple_ref/swift/Property/itemCount" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell9itemCountSi">itemCount</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>the number of folding elements. Default 2</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">itemCount</span><span class="p">:</span> <span class="kt">NSInteger</span> <span class="o">=</span> <span class="mi">2</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC15FoldingCellDemo11FoldingCell13backViewColorCSo7UIColor"></a>
|
||||
<a name="//apple_ref/swift/Property/backViewColor" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC15FoldingCellDemo11FoldingCell13backViewColorCSo7UIColor">backViewColor</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The color of the back cell</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">backViewColor</span><span class="p">:</span> <span class="kt">UIColor</span> <span class="o">=</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">brownColor</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:OC15FoldingCellDemo11FoldingCell13AnimationType"></a>
|
||||
<a name="//apple_ref/swift/Enum/AnimationType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:OC15FoldingCellDemo11FoldingCell13AnimationType">AnimationType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Folding animation types</p>
|
||||
|
||||
<ul>
|
||||
<li>Open: Open direction</li>
|
||||
<li>Close: Close direction</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">AnimationType</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/public"></a>
|
||||
<a name="//apple_ref/swift/Section/public" class="dashAnchor"></a>
|
||||
<a href="#/public">
|
||||
<h3 class="section-name">public</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC15FoldingCellDemo11FoldingCell17selectedAnimationFTSb8animatedSb10completionGSqFT_T___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/selectedAnimation(_:animated:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC15FoldingCellDemo11FoldingCell17selectedAnimationFTSb8animatedSb10completionGSqFT_T___T_">selectedAnimation(_:animated:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Open or close cell</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">selectedAnimation</span><span class="p">(</span><span class="nv">isSelected</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(</span><span class="kt">Void</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>isSelected</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Specify true if you want to open cell or false if you close cell.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>animated</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Specify true if you want to animate the change in visibility or false if you want immediately.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>A block object to be executed when the animation sequence ends.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||
.highlight {
|
||||
/* Comment */
|
||||
/* Error */
|
||||
/* Keyword */
|
||||
/* Operator */
|
||||
/* Comment.Multiline */
|
||||
/* Comment.Preproc */
|
||||
/* Comment.Single */
|
||||
/* Comment.Special */
|
||||
/* Generic.Deleted */
|
||||
/* Generic.Deleted.Specific */
|
||||
/* Generic.Emph */
|
||||
/* Generic.Error */
|
||||
/* Generic.Heading */
|
||||
/* Generic.Inserted */
|
||||
/* Generic.Inserted.Specific */
|
||||
/* Generic.Output */
|
||||
/* Generic.Prompt */
|
||||
/* Generic.Strong */
|
||||
/* Generic.Subheading */
|
||||
/* Generic.Traceback */
|
||||
/* Keyword.Constant */
|
||||
/* Keyword.Declaration */
|
||||
/* Keyword.Pseudo */
|
||||
/* Keyword.Reserved */
|
||||
/* Keyword.Type */
|
||||
/* Literal.Number */
|
||||
/* Literal.String */
|
||||
/* Name.Attribute */
|
||||
/* Name.Builtin */
|
||||
/* Name.Class */
|
||||
/* Name.Constant */
|
||||
/* Name.Entity */
|
||||
/* Name.Exception */
|
||||
/* Name.Function */
|
||||
/* Name.Namespace */
|
||||
/* Name.Tag */
|
||||
/* Name.Variable */
|
||||
/* Operator.Word */
|
||||
/* Text.Whitespace */
|
||||
/* Literal.Number.Float */
|
||||
/* Literal.Number.Hex */
|
||||
/* Literal.Number.Integer */
|
||||
/* Literal.Number.Oct */
|
||||
/* Literal.String.Backtick */
|
||||
/* Literal.String.Char */
|
||||
/* Literal.String.Doc */
|
||||
/* Literal.String.Double */
|
||||
/* Literal.String.Escape */
|
||||
/* Literal.String.Heredoc */
|
||||
/* Literal.String.Interpol */
|
||||
/* Literal.String.Other */
|
||||
/* Literal.String.Regex */
|
||||
/* Literal.String.Single */
|
||||
/* Literal.String.Symbol */
|
||||
/* Name.Builtin.Pseudo */
|
||||
/* Name.Variable.Class */
|
||||
/* Name.Variable.Global */
|
||||
/* Name.Variable.Instance */
|
||||
/* Literal.Number.Integer.Long */ }
|
||||
.highlight .c {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .err {
|
||||
color: #a61717;
|
||||
background-color: #e3d2d2; }
|
||||
.highlight .k {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .o {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .cm {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cp {
|
||||
color: #999999;
|
||||
font-weight: bold; }
|
||||
.highlight .c1 {
|
||||
color: #999988;
|
||||
font-style: italic; }
|
||||
.highlight .cs {
|
||||
color: #999999;
|
||||
font-weight: bold;
|
||||
font-style: italic; }
|
||||
.highlight .gd {
|
||||
color: #000000;
|
||||
background-color: #ffdddd; }
|
||||
.highlight .gd .x {
|
||||
color: #000000;
|
||||
background-color: #ffaaaa; }
|
||||
.highlight .ge {
|
||||
color: #000000;
|
||||
font-style: italic; }
|
||||
.highlight .gr {
|
||||
color: #aa0000; }
|
||||
.highlight .gh {
|
||||
color: #999999; }
|
||||
.highlight .gi {
|
||||
color: #000000;
|
||||
background-color: #ddffdd; }
|
||||
.highlight .gi .x {
|
||||
color: #000000;
|
||||
background-color: #aaffaa; }
|
||||
.highlight .go {
|
||||
color: #888888; }
|
||||
.highlight .gp {
|
||||
color: #555555; }
|
||||
.highlight .gs {
|
||||
font-weight: bold; }
|
||||
.highlight .gu {
|
||||
color: #aaaaaa; }
|
||||
.highlight .gt {
|
||||
color: #aa0000; }
|
||||
.highlight .kc {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kd {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kp {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kr {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .kt {
|
||||
color: #445588; }
|
||||
.highlight .m {
|
||||
color: #009999; }
|
||||
.highlight .s {
|
||||
color: #d14; }
|
||||
.highlight .na {
|
||||
color: #008080; }
|
||||
.highlight .nb {
|
||||
color: #0086B3; }
|
||||
.highlight .nc {
|
||||
color: #445588;
|
||||
font-weight: bold; }
|
||||
.highlight .no {
|
||||
color: #008080; }
|
||||
.highlight .ni {
|
||||
color: #800080; }
|
||||
.highlight .ne {
|
||||
color: #990000;
|
||||
font-weight: bold; }
|
||||
.highlight .nf {
|
||||
color: #990000; }
|
||||
.highlight .nn {
|
||||
color: #555555; }
|
||||
.highlight .nt {
|
||||
color: #000080; }
|
||||
.highlight .nv {
|
||||
color: #008080; }
|
||||
.highlight .ow {
|
||||
color: #000000;
|
||||
font-weight: bold; }
|
||||
.highlight .w {
|
||||
color: #bbbbbb; }
|
||||
.highlight .mf {
|
||||
color: #009999; }
|
||||
.highlight .mh {
|
||||
color: #009999; }
|
||||
.highlight .mi {
|
||||
color: #009999; }
|
||||
.highlight .mo {
|
||||
color: #009999; }
|
||||
.highlight .sb {
|
||||
color: #d14; }
|
||||
.highlight .sc {
|
||||
color: #d14; }
|
||||
.highlight .sd {
|
||||
color: #d14; }
|
||||
.highlight .s2 {
|
||||
color: #d14; }
|
||||
.highlight .se {
|
||||
color: #d14; }
|
||||
.highlight .sh {
|
||||
color: #d14; }
|
||||
.highlight .si {
|
||||
color: #d14; }
|
||||
.highlight .sx {
|
||||
color: #d14; }
|
||||
.highlight .sr {
|
||||
color: #009926; }
|
||||
.highlight .s1 {
|
||||
color: #d14; }
|
||||
.highlight .ss {
|
||||
color: #990073; }
|
||||
.highlight .bp {
|
||||
color: #999999; }
|
||||
.highlight .vc {
|
||||
color: #008080; }
|
||||
.highlight .vg {
|
||||
color: #008080; }
|
||||
.highlight .vi {
|
||||
color: #008080; }
|
||||
.highlight .il {
|
||||
color: #009999; }
|
||||
@@ -0,0 +1,331 @@
|
||||
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline; }
|
||||
|
||||
body {
|
||||
background-color: #f2f2f2;
|
||||
font-family: Helvetica, freesans, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
word-wrap: break-word; }
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.3em;
|
||||
font-weight: 100;
|
||||
color: black; }
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em; }
|
||||
|
||||
h2 {
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #e2e2e2; }
|
||||
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin-top: 21px; }
|
||||
|
||||
h5 {
|
||||
font-size: 1.1em; }
|
||||
|
||||
h6 {
|
||||
font-size: 1.1em;
|
||||
color: #777; }
|
||||
|
||||
.section-name {
|
||||
color: gray;
|
||||
display: block;
|
||||
font-family: Helvetica;
|
||||
font-size: 22px;
|
||||
font-weight: 100;
|
||||
margin-bottom: 15px; }
|
||||
|
||||
pre, code {
|
||||
font: 0.95em Menlo, monospace;
|
||||
color: #777;
|
||||
word-wrap: normal; }
|
||||
|
||||
p code, li code {
|
||||
background-color: #eee;
|
||||
padding: 2px 4px;
|
||||
border-radius: 4px; }
|
||||
|
||||
a {
|
||||
color: #0088cc;
|
||||
text-decoration: none; }
|
||||
|
||||
ul {
|
||||
padding-left: 15px; }
|
||||
|
||||
li {
|
||||
line-height: 1.8em; }
|
||||
|
||||
img {
|
||||
max-width: 100%; }
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
padding: 0 10px;
|
||||
border-left: 4px solid #ccc; }
|
||||
|
||||
.content-wrapper {
|
||||
margin: 0 auto;
|
||||
width: 980px; }
|
||||
|
||||
header {
|
||||
font-size: 0.85em;
|
||||
line-height: 26px;
|
||||
background-color: #414141;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1; }
|
||||
header img {
|
||||
padding-right: 6px;
|
||||
vertical-align: -4px;
|
||||
height: 16px; }
|
||||
header a {
|
||||
color: #fff; }
|
||||
header p {
|
||||
float: left;
|
||||
color: #999; }
|
||||
header .header-right {
|
||||
float: right;
|
||||
margin-left: 16px; }
|
||||
|
||||
#breadcrumbs {
|
||||
background-color: #f2f2f2;
|
||||
height: 27px;
|
||||
padding-top: 17px;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
margin-top: 26px; }
|
||||
#breadcrumbs #carat {
|
||||
height: 10px;
|
||||
margin: 0 5px; }
|
||||
|
||||
.sidebar {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e2e2e2;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
width: 230px;
|
||||
word-wrap: normal; }
|
||||
|
||||
.nav-groups {
|
||||
list-style-type: none;
|
||||
background: #fff;
|
||||
padding-left: 0; }
|
||||
|
||||
.nav-group-name {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
font-size: 1.1em;
|
||||
font-weight: 100;
|
||||
padding: 15px 0 15px 20px; }
|
||||
.nav-group-name > a {
|
||||
color: #333; }
|
||||
|
||||
.nav-group-tasks {
|
||||
margin-top: 5px; }
|
||||
|
||||
.nav-group-task {
|
||||
font-size: 0.9em;
|
||||
list-style-type: none; }
|
||||
.nav-group-task a {
|
||||
color: #888; }
|
||||
|
||||
.main-content {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin-left: 246px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
padding-bottom: 60px;
|
||||
top: 70px;
|
||||
width: 734px; }
|
||||
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
|
||||
margin-bottom: 1em; }
|
||||
.main-content p {
|
||||
line-height: 1.8em; }
|
||||
.main-content section .section:first-child {
|
||||
margin-top: 0;
|
||||
padding-top: 0; }
|
||||
.main-content section .task-group-section .task-group:first-of-type {
|
||||
padding-top: 10px; }
|
||||
.main-content section .task-group-section .task-group:first-of-type .section-name {
|
||||
padding-top: 15px; }
|
||||
|
||||
.section {
|
||||
padding: 0 25px; }
|
||||
|
||||
.highlight {
|
||||
background-color: #eee;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto; }
|
||||
|
||||
.declaration .highlight {
|
||||
overflow-x: initial;
|
||||
padding: 0 40px 40px 0;
|
||||
margin-bottom: -25px;
|
||||
background-color: transparent;
|
||||
border: none; }
|
||||
|
||||
.section-name {
|
||||
margin: 0;
|
||||
margin-left: 18px; }
|
||||
|
||||
.task-group-section {
|
||||
padding-left: 6px;
|
||||
border-top: 1px solid #e2e2e2; }
|
||||
|
||||
.task-group {
|
||||
padding-top: 0px; }
|
||||
|
||||
.task-name-container a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
|
||||
.item {
|
||||
padding-top: 8px;
|
||||
width: 100%;
|
||||
list-style-type: none; }
|
||||
.item a[name]:before {
|
||||
content: "";
|
||||
display: block;
|
||||
padding-top: 70px;
|
||||
margin: -70px 0 0; }
|
||||
.item code {
|
||||
background-color: transparent;
|
||||
padding: 0; }
|
||||
.item .token {
|
||||
padding-left: 3px;
|
||||
margin-left: 15px;
|
||||
font-size: 11.9px; }
|
||||
.item .declaration-note {
|
||||
font-size: .85em;
|
||||
color: gray;
|
||||
font-style: italic; }
|
||||
|
||||
.pointer-container {
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -23px;
|
||||
padding-bottom: 13px;
|
||||
position: relative;
|
||||
width: 110%; }
|
||||
|
||||
.pointer {
|
||||
background: #f9f9f9;
|
||||
border-left: 1px solid #e2e2e2;
|
||||
border-top: 1px solid #e2e2e2;
|
||||
height: 12px;
|
||||
left: 21px;
|
||||
top: -7px;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
width: 12px; }
|
||||
|
||||
.height-container {
|
||||
display: none;
|
||||
left: -25px;
|
||||
padding: 0 25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden; }
|
||||
.height-container .section {
|
||||
background: #f9f9f9;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
left: -25px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px; }
|
||||
|
||||
.aside, .language {
|
||||
padding: 6px 12px;
|
||||
margin: 12px 0;
|
||||
border-left: 5px solid #dddddd;
|
||||
overflow-y: hidden; }
|
||||
.aside .aside-title, .language .aside-title {
|
||||
font-size: 9px;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
-webkit-user-select: none; }
|
||||
.aside p:last-child, .language p:last-child {
|
||||
margin-bottom: 0; }
|
||||
|
||||
.language {
|
||||
border-left: 5px solid #cde9f4; }
|
||||
.language .aside-title {
|
||||
color: #4b8afb; }
|
||||
|
||||
.aside-warning {
|
||||
border-left: 5px solid #ff6666; }
|
||||
.aside-warning .aside-title {
|
||||
color: #ff0000; }
|
||||
|
||||
.graybox {
|
||||
border-collapse: collapse;
|
||||
width: 100%; }
|
||||
.graybox p {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
min-width: 50px; }
|
||||
.graybox td {
|
||||
border: 1px solid #e2e2e2;
|
||||
padding: 5px 25px 5px 10px;
|
||||
vertical-align: middle; }
|
||||
.graybox tr td:first-of-type {
|
||||
text-align: right;
|
||||
padding: 7px;
|
||||
vertical-align: top;
|
||||
word-break: normal;
|
||||
width: 40px; }
|
||||
|
||||
.slightly-smaller {
|
||||
font-size: 0.9em; }
|
||||
|
||||
#footer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
margin-left: 25px; }
|
||||
#footer p {
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
font-size: 0.8em; }
|
||||
|
||||
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
|
||||
display: none; }
|
||||
html.dash .main-content {
|
||||
width: 980px;
|
||||
margin-left: 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
padding-bottom: 0; }
|
||||
html.dash .height-container {
|
||||
display: block; }
|
||||
html.dash .item .token {
|
||||
margin-left: 0; }
|
||||
html.dash .content-wrapper {
|
||||
width: auto; }
|
||||
html.dash #footer {
|
||||
position: static; }
|
||||
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FoldingCellDemo Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="FoldingCellDemo Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
FoldingCellDemo Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<a href='#foldingcelldemo' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='foldingcelldemo'>FoldingCellDemo</h1>
|
||||
<a href='#authors' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='authors'>Authors</h3>
|
||||
|
||||
<p>AlexKalinkin</p>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
var tokenOffset = "15px";
|
||||
var original = link.css('marginLeft') == tokenOffset;
|
||||
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
FoldingCell.swift
|
||||
case Open
|
||||
case Close
|
||||
override public func awakeFromNib()
|
||||
public func isAnimating()->Bool
|
||||
public func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval
|
||||
public class RotatedView: UIView
|
||||
public class RotatedView : UIView
|
||||
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FoldingCellDemo Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset='utf-8'>
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a title="FoldingCellDemo Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">FoldingCellDemo Docs</a> (50% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">FoldingCellDemo Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
FoldingCellDemo Reference
|
||||
</p>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<nav class="sidebar">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/FoldingCell.html">FoldingCell</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<a href='#foldingcelldemo' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='foldingcelldemo'>FoldingCellDemo</h1>
|
||||
<a href='#authors' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='authors'>Authors</h3>
|
||||
|
||||
<p>AlexKalinkin</p>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<section id="footer">
|
||||
<p>© 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-06)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
window.jazzy = {'docset': false}
|
||||
if (typeof window.dash != 'undefined') {
|
||||
document.documentElement.className += ' dash'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
if (navigator.userAgent.match(/xcode/i)) {
|
||||
document.documentElement.className += ' xcode'
|
||||
window.jazzy.docset = true
|
||||
}
|
||||
|
||||
// On doc load, toggle the URL hash discussion if present
|
||||
$(document).ready(function() {
|
||||
if (!window.jazzy.docset) {
|
||||
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||
linkToHash.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
// On token click, toggle its discussion and animate token.marginLeft
|
||||
$(".token").click(function(event) {
|
||||
if (window.jazzy.docset) {
|
||||
return;
|
||||
}
|
||||
var link = $(this);
|
||||
var animationDuration = 300;
|
||||
var tokenOffset = "15px";
|
||||
var original = link.css('marginLeft') == tokenOffset;
|
||||
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
|
||||
$content = link.parent().parent().next();
|
||||
$content.slideToggle(animationDuration);
|
||||
|
||||
// Keeps the document from jumping to the hash.
|
||||
var href = $(this).attr('href');
|
||||
if (history.pushState) {
|
||||
history.pushState({}, '', href);
|
||||
} else {
|
||||
location.hash = href;
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
FoldingCell.swift
|
||||
case Open
|
||||
case Close
|
||||
override public func awakeFromNib()
|
||||
public func isAnimating()->Bool
|
||||
public func animationDuration(itemIndex:NSInteger, type:AnimationType)-> NSTimeInterval
|
||||
public class RotatedView: UIView
|
||||
public class RotatedView : UIView
|
||||
|
After Width: | Height: | Size: 20 KiB |