Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25d94360e1 | ||
|
|
b0e7cc7f0c | ||
|
|
169f1bb59f | ||
|
|
65344f8c34 | ||
|
|
3e9e629839 | ||
|
|
8cb5e56d70 | ||
|
|
fdea171402 | ||
|
|
956a270b1e | ||
|
|
b832f9e372 | ||
|
|
aa66607cbd | ||
|
|
2ef07885b7 | ||
|
|
d89e99654f | ||
|
|
c91a711dd8 | ||
|
|
a003cc01d1 | ||
|
|
4eb15908f3 | ||
|
|
3aa04958d3 | ||
|
|
43808c6d33 | ||
|
|
84f19193e3 | ||
|
|
a2c6b4afbf | ||
|
|
2f74142383 | ||
|
|
a4df164649 | ||
|
|
729f3b7c5b | ||
|
|
959f922708 | ||
|
|
656aa95fea | ||
|
|
0f00fde7e6 | ||
|
|
f9654a5358 | ||
|
|
dd43c0251f | ||
|
|
b3f881281e | ||
|
|
c17d24bcee | ||
|
|
b1853f8e2a | ||
|
|
58e672ef87 | ||
|
|
de040b348b | ||
|
|
01bd7502ca | ||
|
|
8b09ecc842 | ||
|
|
6738ca13cb | ||
|
|
19ba6c05aa | ||
|
|
3184fff1e1 | ||
|
|
aec1fba654 | ||
|
|
9638439000 | ||
|
|
e6e69fa55e | ||
|
|
5621816196 | ||
|
|
4e1d8cad4f | ||
|
|
8600aa0d54 | ||
|
|
aa0a14896c | ||
|
|
46dfafada1 | ||
|
|
94f0f5fb6b | ||
|
|
8c90388bda | ||
|
|
5623d1fe50 | ||
|
|
5cee05d1c4 | ||
|
|
185d81d648 | ||
|
|
a899d78f2b | ||
|
|
538e682116 | ||
|
|
ebf4524f3b | ||
|
|
2d7a929f83 | ||
|
|
ee0b1a3d5a | ||
|
|
da9febb69e | ||
|
|
ab1b552e14 | ||
|
|
d576d316c6 | ||
|
|
75d8d52d55 |
@@ -0,0 +1,6 @@
|
||||
osx_image: xcode7.3
|
||||
language: objective-c
|
||||
|
||||
xcode_project: DemoExpandingCollection/DemoExpandingCollection.xcodeproj
|
||||
xcode_scheme: ExpandingCollection
|
||||
xcode_sdk: iphonesimulator
|
||||
@@ -0,0 +1,33 @@
|
||||
# Contributing to a Project
|
||||
Now that you’ve found the material for understanding the project, here is how you can take action.
|
||||
|
||||
### Create an Issue
|
||||
|
||||
If you find a bug in a project you’re using (and you don’t know how to fix it), have trouble following the documentation or have a question about the project – create an issue! There’s nothing to it and whatever issue you’re having, you’re likely not the only one, so others will find your issue helpful, too. For more information on how issues work, check out our Issues guide.
|
||||
|
||||
#### Issues Pro Tips
|
||||
|
||||
Check existing issues for your issue. Duplicating an issue is slower for both parties so search through open and closed issues to see if what you’re running into has been addressed already.
|
||||
Be clear about what your problem is: what was the expected outcome, what happened instead? Detail how someone else can recreate the problem.
|
||||
Link to demos recreating the problem on things like JSFiddle or CodePen.
|
||||
Include system details like what the browser, library or operating system you’re using and its version.
|
||||
Paste error output or logs in your issue or in a Gist. If pasting them in the issue, wrap it in three backticks: ``` so that it renders nicely.
|
||||
|
||||
### Pull Request
|
||||
|
||||
If you’re able to patch the bug or add the feature yourself – fantastic, make a pull request with the code! Be sure you’ve read any documents on contributing, understand the license and have signed a CLA if required. Once you’ve submitted a pull request the maintainer(s) can compare your branch to the existing one and decide whether or not to incorporate (pull in) your changes.
|
||||
|
||||
#### Pull Request Pro Tips
|
||||
|
||||
Fork the repository and clone it locally. Connect your local to the original ‘upstream’ repository by adding it as a remote. Pull in changes from ‘upstream’ often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. See more detailed instructions here.
|
||||
Create a branch for your edits.
|
||||
Be clear about what problem is occurring and how someone can recreate that problem or why your feature will help. Then be equally as clear about the steps you took to make your changes.
|
||||
It’s best to test. Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
|
||||
Include screenshots of the before and after if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
|
||||
Contribute in the style of the project to the best of your abilities. This may mean using indents, semi colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
|
||||
|
||||
#### Open Pull Requests
|
||||
|
||||
Once you’ve opened a pull request a discussion will start around your proposed changes. Other contributors and users may chime in, but ultimately the decision is made by the maintainer(s). You may be asked to make some changes to your pull request, if so, add more commits to your branch and push them – they’ll automatically go into the existing pull request.
|
||||
|
||||
If your pull request is merged – great! If it is not, no sweat, it may not be what the project maintainer had in mind, or they were already working on it. This happens, so our recommendation is to take any feedback you’ve received and go forth and pull request again – or create your own open source project.
|
||||
@@ -31,6 +31,20 @@
|
||||
848596881CF58A62000BCC74 /* PageCollectionLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596871CF58A62000BCC74 /* PageCollectionLayout.swift */; };
|
||||
8485968B1CF58A7D000BCC74 /* CollectionViewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8485968A1CF58A7D000BCC74 /* CollectionViewHelper.swift */; };
|
||||
848596921CF58DE0000BCC74 /* BasePageCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596911CF58DE0000BCC74 /* BasePageCollectionCell.swift */; };
|
||||
8499D8171D001B82004B5B37 /* ExpandingCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499D8161D001B82004B5B37 /* ExpandingCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8499D81B1D001B82004B5B37 /* ExpandingCollection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8141D001B82004B5B37 /* ExpandingCollection.framework */; };
|
||||
8499D81C1D001B82004B5B37 /* ExpandingCollection.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8141D001B82004B5B37 /* ExpandingCollection.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
8499D8211D001B9E004B5B37 /* BasePageCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596911CF58DE0000BCC74 /* BasePageCollectionCell.swift */; };
|
||||
8499D8221D001BA1004B5B37 /* PageCollectionLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596871CF58A62000BCC74 /* PageCollectionLayout.swift */; };
|
||||
8499D8231D001BA5004B5B37 /* PageCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596841CF58A3F000BCC74 /* PageCollectionView.swift */; };
|
||||
8499D8241D001BA8004B5B37 /* ExpandingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596811CF58A36000BCC74 /* ExpandingViewController.swift */; };
|
||||
8499D8251D001BAD004B5B37 /* SubviewsForEach.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AC75E41CF6F5CB00421857 /* SubviewsForEach.swift */; };
|
||||
8499D8261D001BB1004B5B37 /* ScreenShotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8485967A1CF5897B000BCC74 /* ScreenShotHelper.swift */; };
|
||||
8499D8271D001BB5004B5B37 /* ConstraintsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596771CF58973000BCC74 /* ConstraintsHelper.swift */; };
|
||||
8499D8281D001BBA004B5B37 /* ConfigurationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596741CF58965000BCC74 /* ConfigurationHelper.swift */; };
|
||||
8499D8291D001BBF004B5B37 /* CornerAnimatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596711CF58954000BCC74 /* CornerAnimatable.swift */; };
|
||||
8499D82A1D001BC3004B5B37 /* ExpandingTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596671CF58853000BCC74 /* ExpandingTableViewController.swift */; };
|
||||
8499D82B1D001BC7004B5B37 /* TransitionDriver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596601CF58763000BCC74 /* TransitionDriver.swift */; };
|
||||
84AC75E51CF6F5CB00421857 /* SubviewsForEach.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AC75E41CF6F5CB00421857 /* SubviewsForEach.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -42,8 +56,29 @@
|
||||
remoteGlobalIDString = 848596271CF585F3000BCC74;
|
||||
remoteInfo = DemoExpandingCollection;
|
||||
};
|
||||
8499D8191D001B82004B5B37 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 848596201CF585F3000BCC74 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8499D8131D001B82004B5B37;
|
||||
remoteInfo = ExpandingCollection;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8499D8201D001B82004B5B37 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
8499D81C1D001B82004B5B37 /* ExpandingCollection.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8422CA701CF73EE4007E8522 /* AnimationBarButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationBarButton.swift; sourceTree = "<group>"; };
|
||||
8422CA721CF73EE4007E8522 /* Rotatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Rotatable.swift; sourceTree = "<group>"; };
|
||||
@@ -73,6 +108,9 @@
|
||||
848596871CF58A62000BCC74 /* PageCollectionLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageCollectionLayout.swift; sourceTree = "<group>"; };
|
||||
8485968A1CF58A7D000BCC74 /* CollectionViewHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewHelper.swift; sourceTree = "<group>"; };
|
||||
848596911CF58DE0000BCC74 /* BasePageCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePageCollectionCell.swift; sourceTree = "<group>"; };
|
||||
8499D8141D001B82004B5B37 /* ExpandingCollection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExpandingCollection.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8499D8161D001B82004B5B37 /* ExpandingCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExpandingCollection.h; sourceTree = "<group>"; };
|
||||
8499D8181D001B82004B5B37 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
84AC75E41CF6F5CB00421857 /* SubviewsForEach.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubviewsForEach.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -81,6 +119,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D81B1D001B82004B5B37 /* ExpandingCollection.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -91,6 +130,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D8101D001B82004B5B37 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@@ -124,6 +170,7 @@
|
||||
children = (
|
||||
8485962A1CF585F3000BCC74 /* DemoExpandingCollection */,
|
||||
8485963F1CF585F3000BCC74 /* DemoExpandingCollectionTests */,
|
||||
8499D8151D001B82004B5B37 /* ExpandingCollection */,
|
||||
848596291CF585F3000BCC74 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -133,6 +180,7 @@
|
||||
children = (
|
||||
848596281CF585F3000BCC74 /* DemoExpandingCollection.app */,
|
||||
8485963C1CF585F3000BCC74 /* DemoExpandingCollectionTests.xctest */,
|
||||
8499D8141D001B82004B5B37 /* ExpandingCollection.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -346,6 +394,15 @@
|
||||
path = Cells;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8499D8151D001B82004B5B37 /* ExpandingCollection */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8499D8161D001B82004B5B37 /* ExpandingCollection.h */,
|
||||
8499D8181D001B82004B5B37 /* Info.plist */,
|
||||
);
|
||||
path = ExpandingCollection;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
84AC75E31CF6F55C00421857 /* SubviewsForEach */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -356,6 +413,17 @@
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8499D8111D001B82004B5B37 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D8171D001B82004B5B37 /* ExpandingCollection.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
848596271CF585F3000BCC74 /* DemoExpandingCollection */ = {
|
||||
isa = PBXNativeTarget;
|
||||
@@ -365,10 +433,12 @@
|
||||
848596241CF585F3000BCC74 /* Sources */,
|
||||
848596251CF585F3000BCC74 /* Frameworks */,
|
||||
848596261CF585F3000BCC74 /* Resources */,
|
||||
8499D8201D001B82004B5B37 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
8499D81A1D001B82004B5B37 /* PBXTargetDependency */,
|
||||
);
|
||||
name = DemoExpandingCollection;
|
||||
productName = DemoExpandingCollection;
|
||||
@@ -393,6 +463,24 @@
|
||||
productReference = 8485963C1CF585F3000BCC74 /* DemoExpandingCollectionTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
8499D8131D001B82004B5B37 /* ExpandingCollection */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 8499D81F1D001B82004B5B37 /* Build configuration list for PBXNativeTarget "ExpandingCollection" */;
|
||||
buildPhases = (
|
||||
8499D80F1D001B82004B5B37 /* Sources */,
|
||||
8499D8101D001B82004B5B37 /* Frameworks */,
|
||||
8499D8111D001B82004B5B37 /* Headers */,
|
||||
8499D8121D001B82004B5B37 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ExpandingCollection;
|
||||
productName = ExpandingCollection;
|
||||
productReference = 8499D8141D001B82004B5B37 /* ExpandingCollection.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@@ -405,11 +493,16 @@
|
||||
TargetAttributes = {
|
||||
848596271CF585F3000BCC74 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
};
|
||||
8485963B1CF585F3000BCC74 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
TestTargetID = 848596271CF585F3000BCC74;
|
||||
};
|
||||
8499D8131D001B82004B5B37 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 848596231CF585F3000BCC74 /* Build configuration list for PBXProject "DemoExpandingCollection" */;
|
||||
@@ -427,6 +520,7 @@
|
||||
targets = (
|
||||
848596271CF585F3000BCC74 /* DemoExpandingCollection */,
|
||||
8485963B1CF585F3000BCC74 /* DemoExpandingCollectionTests */,
|
||||
8499D8131D001B82004B5B37 /* ExpandingCollection */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -450,6 +544,13 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D8121D001B82004B5B37 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
@@ -505,6 +606,24 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8499D80F1D001B82004B5B37 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D8271D001BB5004B5B37 /* ConstraintsHelper.swift in Sources */,
|
||||
8499D8221D001BA1004B5B37 /* PageCollectionLayout.swift in Sources */,
|
||||
8499D8261D001BB1004B5B37 /* ScreenShotHelper.swift in Sources */,
|
||||
8499D8251D001BAD004B5B37 /* SubviewsForEach.swift in Sources */,
|
||||
8499D8281D001BBA004B5B37 /* ConfigurationHelper.swift in Sources */,
|
||||
8499D8241D001BA8004B5B37 /* ExpandingViewController.swift in Sources */,
|
||||
8499D82A1D001BC3004B5B37 /* ExpandingTableViewController.swift in Sources */,
|
||||
8499D82B1D001BC7004B5B37 /* TransitionDriver.swift in Sources */,
|
||||
8499D8291D001BBF004B5B37 /* CornerAnimatable.swift in Sources */,
|
||||
8499D8211D001B9E004B5B37 /* BasePageCollectionCell.swift in Sources */,
|
||||
8499D8231D001BA5004B5B37 /* PageCollectionView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
@@ -513,6 +632,11 @@
|
||||
target = 848596271CF585F3000BCC74 /* DemoExpandingCollection */;
|
||||
targetProxy = 8485963D1CF585F3000BCC74 /* PBXContainerItemProxy */;
|
||||
};
|
||||
8499D81A1D001B82004B5B37 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8499D8131D001B82004B5B37 /* ExpandingCollection */;
|
||||
targetProxy = 8499D8191D001B82004B5B37 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
@@ -624,6 +748,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
INFOPLIST_FILE = DemoExpandingCollection/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -639,6 +764,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
INFOPLIST_FILE = DemoExpandingCollection/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -672,6 +798,52 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8499D81D1D001B82004B5B37 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = ExpandingCollection/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.dev;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8499D81E1D001B82004B5B37 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = ExpandingCollection/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.dev;
|
||||
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 */
|
||||
@@ -702,6 +874,15 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8499D81F1D001B82004B5B37 /* Build configuration list for PBXNativeTarget "ExpandingCollection" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8499D81D1D001B82004B5B37 /* Debug */,
|
||||
8499D81E1D001B82004B5B37 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 848596201CF585F3000BCC74 /* Project object */;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8499D8131D001B82004B5B37"
|
||||
BuildableName = "ExpandingCollection.framework"
|
||||
BlueprintName = "ExpandingCollection"
|
||||
ReferencedContainer = "container:DemoExpandingCollection.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<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">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8499D8131D001B82004B5B37"
|
||||
BuildableName = "ExpandingCollection.framework"
|
||||
BlueprintName = "ExpandingCollection"
|
||||
ReferencedContainer = "container:DemoExpandingCollection.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8499D8131D001B82004B5B37"
|
||||
BuildableName = "ExpandingCollection.framework"
|
||||
BlueprintName = "ExpandingCollection"
|
||||
ReferencedContainer = "container:DemoExpandingCollection.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -49,10 +49,9 @@ extension AppDelegate {
|
||||
shadow.shadowOffset = CGSize(width: 0, height: 2)
|
||||
shadow.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.1)
|
||||
|
||||
// shadow.shadowOffset = k
|
||||
UINavigationBar.appearance().titleTextAttributes = [
|
||||
NSForegroundColorAttributeName : UIColor.whiteColor(),
|
||||
NSShadowAttributeName: shadow
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
import UIKit
|
||||
|
||||
extension UICollectionView {
|
||||
|
||||
func getReusableCellWithIdentifier<T: UICollectionViewCell where T: CollectionViewCellIdentifiable>(indexPath: NSIndexPath) -> T {
|
||||
guard let cell = self.dequeueReusableCellWithReuseIdentifier(T.cellIdentifier, forIndexPath: indexPath) as? T else {
|
||||
guard let cell = dequeueReusableCellWithReuseIdentifier(T.cellIdentifier, forIndexPath: indexPath) as? T else {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.cellIdentifier) ")
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ extension UIStoryboard {
|
||||
}
|
||||
|
||||
func instantiateViewController<T: UIViewController where T: StoryboardIdentifiable>() -> T {
|
||||
guard let viewController = self.instantiateViewControllerWithIdentifier(T.storyboardIdentifier) as? T else {
|
||||
guard let viewController = instantiateViewControllerWithIdentifier(T.storyboardIdentifier) as? T else {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.storyboardIdentifier) ")
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ class DemoTableViewController: ExpandingTableViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
configureNavBar()
|
||||
tableView.backgroundView = UIImageView(image: UIImage.Asset.BackgroundImage.image)
|
||||
let image1 = UIImage.Asset.BackgroundImage.image
|
||||
tableView.backgroundView = UIImageView(image: image1)
|
||||
}
|
||||
}
|
||||
// MARK: Helpers
|
||||
@@ -33,8 +34,10 @@ extension DemoTableViewController {
|
||||
|
||||
@IBAction func backButtonHandler(sender: AnyObject) {
|
||||
// buttonAnimation
|
||||
for case let viewController as DemoViewController in navigationController!.viewControllers {
|
||||
if case let rightButton as AnimatingBarButton = viewController.navigationItem.rightBarButtonItem {
|
||||
let viewControllers: [DemoViewController?] = navigationController?.viewControllers.map { $0 as? DemoViewController } ?? []
|
||||
|
||||
for viewController in viewControllers {
|
||||
if let rightButton = viewController?.navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
rightButton.animationSelected(false)
|
||||
}
|
||||
}
|
||||
@@ -47,16 +50,18 @@ extension DemoTableViewController {
|
||||
extension DemoTableViewController {
|
||||
|
||||
override func scrollViewDidScroll(scrollView: UIScrollView) {
|
||||
if scrollView.contentOffset.y < -25 {
|
||||
// buttonAnimation
|
||||
for case let viewController as DemoViewController in navigationController!.viewControllers {
|
||||
if case let rightButton as AnimatingBarButton = viewController.navigationItem.rightBarButtonItem {
|
||||
rightButton.animationSelected(false)
|
||||
}
|
||||
}
|
||||
popTransitionAnimation()
|
||||
}
|
||||
// if scrollView.contentOffset.y < -25 {
|
||||
// // buttonAnimation
|
||||
// let viewControllers: [DemoViewController?] = navigationController?.viewControllers.map { $0 as? DemoViewController } ?? []
|
||||
//
|
||||
// for viewController in viewControllers {
|
||||
// if let rightButton = viewController?.navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
// rightButton.animationSelected(false)
|
||||
// }
|
||||
// }
|
||||
// popTransitionAnimation()
|
||||
// }
|
||||
|
||||
scrollOffsetY = scrollView.contentOffset.y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,5 @@ class DemoCollectionViewCell: BasePageCollectionCell {
|
||||
customTitle.layer.shadowRadius = 2
|
||||
customTitle.layer.shadowOffset = CGSize(width: 0, height: 3)
|
||||
customTitle.layer.shadowOpacity = 0.2
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ class DemoViewController: ExpandingViewController {
|
||||
extension DemoViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
itemSize = CGSize(width: 256, height: 335)
|
||||
super.viewDidLoad()
|
||||
|
||||
registerCell()
|
||||
@@ -41,7 +42,7 @@ extension DemoViewController {
|
||||
}
|
||||
|
||||
private func fillCellIsOpeenArry() {
|
||||
for _ in 0..<items.count {
|
||||
for _ in items {
|
||||
cellsIsOpen.append(false)
|
||||
}
|
||||
}
|
||||
@@ -75,15 +76,12 @@ extension DemoViewController {
|
||||
|
||||
func swipeHandler(sender: UISwipeGestureRecognizer) {
|
||||
let indexPath = NSIndexPath(forRow: currentIndex, inSection: 0)
|
||||
guard case let cell as DemoCollectionViewCell = collectionView?.cellForItemAtIndexPath(indexPath) else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let cell = collectionView?.cellForItemAtIndexPath(indexPath) as? DemoCollectionViewCell else { return }
|
||||
// double swipe Up transition
|
||||
if cell.isOpened == true && sender.direction == .Up {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if case let rightButton as AnimatingBarButton = navigationItem.rightBarButtonItem {
|
||||
if let rightButton = navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
}
|
||||
@@ -107,29 +105,27 @@ extension DemoViewController {
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
guard case let cell as DemoCollectionViewCell = cell else {
|
||||
return
|
||||
}
|
||||
let index = indexPath.row % 4
|
||||
override func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
super.collectionView(collectionView, willDisplayCell: cell, forItemAtIndexPath: indexPath)
|
||||
guard let cell = cell as? DemoCollectionViewCell else { return }
|
||||
|
||||
let index = indexPath.row % items.count
|
||||
let info = items[index]
|
||||
cell.backgroundImageView?.image = UIImage(named: info.imageName)
|
||||
cell.customTitle.text = info.title
|
||||
cell.cellIsOpen(cellsIsOpen[indexPath.row], animated: false)
|
||||
cell.cellIsOpen(cellsIsOpen[index], animated: false)
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
|
||||
guard case let cell as DemoCollectionViewCell = collectionView.cellForItemAtIndexPath(indexPath) else {
|
||||
return
|
||||
}
|
||||
if currentIndex != indexPath.row { return }
|
||||
|
||||
guard let cell = collectionView.cellForItemAtIndexPath(indexPath) as? DemoCollectionViewCell
|
||||
where currentIndex == indexPath.row else { return }
|
||||
|
||||
if cell.isOpened == false {
|
||||
cell.cellIsOpen(true)
|
||||
} else {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if case let rightButton as AnimatingBarButton = navigationItem.rightBarButtonItem {
|
||||
if let rightButton = navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
}
|
||||
@@ -148,4 +144,3 @@ extension DemoViewController {
|
||||
return collectionView.dequeueReusableCellWithReuseIdentifier(String(DemoCollectionViewCell), forIndexPath: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,8 @@ extension AnimatingBarButton {
|
||||
}
|
||||
|
||||
private func configureImageView(imageView: UIImageView, imageName: String) {
|
||||
guard let customView = self.customView else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let customView = customView else { return }
|
||||
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView.image = UIImage(named: imageName)
|
||||
imageView.contentMode = .ScaleAspectFit
|
||||
@@ -85,5 +83,4 @@ extension AnimatingBarButton {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
import UIKit
|
||||
|
||||
protocol Rotatable {
|
||||
|
||||
|
||||
func rotateAnimationFrom(fromItem: UIView, toItem: UIView, duration: Double)
|
||||
}
|
||||
|
||||
extension Rotatable {
|
||||
|
||||
|
||||
func rotateAnimationFrom(fromItem: UIView, toItem: UIView, duration: Double) {
|
||||
|
||||
let fromRotate = animationFrom(0, to: M_PI, key: "transform.rotation", duration: duration)
|
||||
@@ -36,7 +36,7 @@ extension Rotatable {
|
||||
$0.fromValue = from
|
||||
$0.toValue = to
|
||||
$0.fillMode = kCAFillModeForwards
|
||||
$0.removedOnCompletion = false;
|
||||
$0.removedOnCompletion = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,8 @@ class DemoExpandingCollectionTests: XCTestCase {
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measureBlock {
|
||||
measureBlock {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// ExpandingCollection.h
|
||||
// ExpandingCollection
|
||||
//
|
||||
// Created by Alex K. on 02/06/16.
|
||||
// Copyright © 2016 Alex K. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for ExpandingCollection.
|
||||
FOUNDATION_EXPORT double ExpandingCollectionVersionNumber;
|
||||
|
||||
//! Project version string for ExpandingCollection.
|
||||
FOUNDATION_EXPORT const unsigned char ExpandingCollectionVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ExpandingCollection/PublicHeader.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +1,168 @@
|
||||

|
||||
|
||||
# expanding-collection
|
||||
|
||||
[](http://twitter.com/Ramotion)
|
||||
[](https://cocoapods.org/pods/expanding-collection)
|
||||
[](http://cocoapods.org/pods/expanding-collection)
|
||||
[](https://cdn.rawgit.com/Ramotion/expanding-collection/master/docs/index.html)
|
||||
|
||||
[](https://github.com/Ramotion/expanding-collection)
|
||||
[](https://travis-ci.org/Ramotion/elastic-pull-to-update)
|
||||
[](https://codebeat.co/projects/github-com-ramotion-expanding-collection)
|
||||
|
||||
[shot on dribbble](https://dribbble.com/shots/2741477-iOS-Expanding-Collection-Open-Source):
|
||||

|
||||
|
||||
The [iPhone mockup](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection) available [here](https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection).
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 8.0+
|
||||
- Xcode 7.3
|
||||
|
||||
## Installation
|
||||
|
||||
Just add the Source folder to your project.
|
||||
|
||||
or use [CocoaPods](https://cocoapods.org) with Podfile:
|
||||
``` ruby
|
||||
pod 'expanding-collection'
|
||||
```
|
||||
or [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:
|
||||
```
|
||||
github "Ramotion/expanding-collection"
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```swift
|
||||
import ExpandingCollection
|
||||
```
|
||||
|
||||
#### Create CollectionViewCell
|
||||

|
||||
|
||||
1) Create UICollectionViewCell inherit from `BasePageCollectionCell` (recommend create cell with xib file)
|
||||
|
||||
2) Adding FrontView
|
||||
- add a view to YOURCELL.xib and connect it to `@IBOutlet weak var frontContainerView: UIView!`
|
||||
- add width, height, centerX and centerY constraints (width and height constranints must equal cellSize)
|
||||
|
||||

|
||||
- connect centerY constraint to `@IBOutlet weak var frontConstraintY: NSLayoutConstraint!`
|
||||
- add any desired uiviews to frontView
|
||||
|
||||
3) Adding BackView
|
||||
- repeat step 2 (connect outlets to `@IBOutlet weak var backContainerView: UIView!`, `@IBOutlet weak var backConstraintY: NSLayoutConstraint!`)
|
||||
|
||||
4) Cell example [DemoCell](https://github.com/Ramotion/expanding-collection/tree/master/DemoExpandingCollection/DemoExpandingCollection/ViewControllers/DemoViewController/Cells)
|
||||
|
||||
###### If set `tag = 101` for any `FrontView.subviews` this view will be hidden during the transition animation
|
||||
|
||||
#### Create CollectionViewController
|
||||
|
||||
1) Create a UIViewController inheriting from `ExpandingViewController`
|
||||
|
||||
2) Register Cell and set Cell size:
|
||||
|
||||
``` swift
|
||||
override func viewDidLoad() {
|
||||
itemSize = CGSize(width: 214, height: 264)
|
||||
super.viewDidLoad()
|
||||
|
||||
// register cell
|
||||
let nib = UINib(nibName: "NibName", bundle: nil)
|
||||
collectionView?.registerNib(nib, forCellWithReuseIdentifier: "CellIdentifier")
|
||||
}
|
||||
```
|
||||
|
||||
3) Add UICollectionViewDataSource methods
|
||||
|
||||
``` swift
|
||||
extension YourViewController {
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return items.count
|
||||
}
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("CellIdentifier"), forIndexPath: indexPath)
|
||||
// configure cell
|
||||
return cell
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4) Open Cell animation
|
||||
|
||||
```swift
|
||||
override func viewDidLoad() {
|
||||
itemSize = CGSize(width: 214, height: 264)
|
||||
super.viewDidLoad()
|
||||
|
||||
// register cell
|
||||
let nib = UINib(nibName: "CellIdentifier", bundle: nil)
|
||||
collectionView?.registerNib(nib, forCellWithReuseIdentifier: String(DemoCollectionViewCell))
|
||||
}
|
||||
```
|
||||
|
||||
``` swift
|
||||
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
|
||||
cell.cellIsOpen(!cell.isOpened)
|
||||
}
|
||||
```
|
||||
|
||||
###### if you use this delegates method:
|
||||
```Swift
|
||||
func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath)
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView)
|
||||
```
|
||||
###### must call super method:
|
||||
```Swift
|
||||
func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
super.collectionView(collectionView: collectionView, willDisplayCell cell: cell, forItemAtIndexPath indexPath: indexPath)
|
||||
// code
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
|
||||
super.scrollViewDidEndDecelerating(scrollView: scrollView)
|
||||
// code
|
||||
}
|
||||
```
|
||||
#### Transition animation
|
||||
|
||||
1) Create a UITableViewController inheriting from `ExpandingTableViewController`
|
||||
|
||||
2) Set header height default 236
|
||||
|
||||
``` swift
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
headerHeight = ***
|
||||
}
|
||||
```
|
||||
|
||||
3) Call the push method in YourViewController to YourTableViewController
|
||||
|
||||
``` swift
|
||||
if cell.isOpened == true {
|
||||
let vc: YourTableViewController = // ... create view controller
|
||||
pushToViewController(vc)
|
||||
}
|
||||
```
|
||||
4) For back transition use `popTransitionAnimation()`
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Expanding collection is released under the MIT license.
|
||||
See [LICENSE](./LICENSE) for details.
|
||||
|
||||
## About
|
||||
The project maintained by [app development agency](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection) [Ramotion Inc.](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection)
|
||||
See our other [open-source projects](https://github.com/ramotion) or [hire](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection) us to design, develop, and grow your product.
|
||||
|
||||
[](https://twitter.com/intent/tweet?text=https://github.com/ramotion/expanding-collection)
|
||||
[](https://twitter.com/ramotion)
|
||||
|
||||
@@ -8,16 +8,14 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// Base class for UITableViewcontroller which have back transition method
|
||||
public class ExpandingTableViewController: UITableViewController {
|
||||
|
||||
// MARK: Vars
|
||||
|
||||
/// The height of the table view header
|
||||
public var headerHeight: CGFloat = 236
|
||||
var transitionDriver: TransitionDriver?
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
var transitionDriver: TransitionDriver?
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
@@ -26,22 +24,41 @@ extension ExpandingTableViewController {
|
||||
|
||||
private func getScreen() -> UIImage? {
|
||||
let height = (headerHeight - tableView.contentOffset.y) < 0 ? 0 : (headerHeight - tableView.contentOffset.y)
|
||||
let backImageSize = CGSize(width: view.bounds.width, height: view.bounds.height - height)
|
||||
let backImageSize = CGSize(width: view.bounds.width, height: view.bounds.height - height + getTabBarHeight())
|
||||
let backImageOrigin = CGPoint(x: 0, y: height + tableView.contentOffset.y)
|
||||
return view.takeSnapshot(CGRect(origin: backImageOrigin, size: backImageSize))
|
||||
}
|
||||
|
||||
private func getTabBarHeight() -> CGFloat {
|
||||
guard let navigationController = self.navigationController else {
|
||||
return 0
|
||||
}
|
||||
|
||||
let insets = automaticallyAdjustsScrollViewInsets
|
||||
let tabBarHeight = insets == true ? navigationController.navigationBar.frame.size.height : 0
|
||||
let stausBarHeight = insets == true ? UIApplication.sharedApplication().statusBarFrame.size.height : 0
|
||||
return tabBarHeight + stausBarHeight
|
||||
}
|
||||
|
||||
}
|
||||
// MARK: Public
|
||||
|
||||
// MARK: Methods
|
||||
|
||||
extension ExpandingTableViewController {
|
||||
|
||||
/**
|
||||
Pops the top view controller from the navigation stack and updates the display with custom animation.
|
||||
*/
|
||||
public func popTransitionAnimation() {
|
||||
guard let transitionDriver = self.transitionDriver else {
|
||||
return
|
||||
}
|
||||
|
||||
let backImage = getScreen()
|
||||
let offset = tableView.contentOffset.y > headerHeight ? headerHeight : tableView.contentOffset.y
|
||||
var offset = tableView.contentOffset.y > headerHeight ? headerHeight : tableView.contentOffset.y
|
||||
|
||||
offset += getTabBarHeight()
|
||||
|
||||
transitionDriver.popTransitionAnimationContantOffset(offset, backImage: backImage)
|
||||
self.navigationController?.popViewControllerAnimated(false)
|
||||
}
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// Base class for UICollectionViewCell
|
||||
public class BasePageCollectionCell: UICollectionViewCell {
|
||||
|
||||
@IBInspectable public var openSize: CGFloat = 40
|
||||
/// Animation oposition offset when cell is open
|
||||
@IBInspectable public var yOffset: CGFloat = 40
|
||||
|
||||
// MARK: Constants
|
||||
|
||||
@@ -25,23 +27,43 @@ public class BasePageCollectionCell: UICollectionViewCell {
|
||||
|
||||
// MARK: Vars
|
||||
|
||||
@IBOutlet weak var frontContainerView: UIView!
|
||||
@IBOutlet weak var backContainerView: UIView!
|
||||
/// The view used as the face of the cell must connectid from xib or storyboard.
|
||||
@IBOutlet public weak var frontContainerView: UIView!
|
||||
/// The view used as the back of the cell must connectid from xib or storyboard.
|
||||
@IBOutlet public weak var backContainerView: UIView!
|
||||
|
||||
@IBOutlet weak var backConstraintY: NSLayoutConstraint!
|
||||
@IBOutlet weak var frontConstraintY: NSLayoutConstraint!
|
||||
/// constraints for backContainerView must connectid from xib or storyboard
|
||||
@IBOutlet public weak var backConstraintY: NSLayoutConstraint!
|
||||
/// constraints for frontContainerView must connectid from xib or storyboard
|
||||
@IBOutlet public weak var frontConstraintY: NSLayoutConstraint!
|
||||
|
||||
var shadowView: UIView?
|
||||
|
||||
/// A Boolean value that indicates whether the cell is opened.
|
||||
public var isOpened = false
|
||||
|
||||
// MARK: inits
|
||||
|
||||
/**
|
||||
Initializes a UICollectionViewCell from data in a given unarchiver.
|
||||
|
||||
- parameter aDecoder: An unarchiver object.
|
||||
|
||||
- returns: An initialized UICollectionViewCell object.
|
||||
*/
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
configureOutletFromDecoder(aDecoder)
|
||||
}
|
||||
|
||||
/**
|
||||
Initializes and returns a newly allocated view object with the specified frame rectangle.
|
||||
|
||||
- parameter frame: The frame rectangle for the view
|
||||
|
||||
- returns: An initialized UICollectionViewCell object.
|
||||
*/
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
@@ -70,20 +92,29 @@ extension BasePageCollectionCell {
|
||||
|
||||
extension BasePageCollectionCell {
|
||||
|
||||
/**
|
||||
Open or close cell.
|
||||
|
||||
- parameter isOpen: Contains the value true if the cell should display open state, if false should display close state.
|
||||
- parameter animated: Set to true if the change in selection state is animated.
|
||||
*/
|
||||
public func cellIsOpen(isOpen: Bool, animated: Bool = true) {
|
||||
if isOpen == isOpened { return }
|
||||
|
||||
frontConstraintY.constant = isOpen == true ? -bounds.size.height / 5 : 0
|
||||
backConstraintY.constant = isOpen == true ? bounds.size.height / 5 - openSize / 2 : 0
|
||||
frontConstraintY.constant = isOpen == true ? -frontContainerView.bounds.size.height / 5 : 0
|
||||
backConstraintY.constant = isOpen == true ? frontContainerView.bounds.size.height / 5 - yOffset / 2 : 0
|
||||
|
||||
if let widthConstant = backContainerView.getConstraint(.Width) {
|
||||
widthConstant.constant = isOpen == true ? contentView.bounds.size.width + openSize : contentView.bounds.size.width
|
||||
widthConstant.constant = isOpen == true ? frontContainerView.bounds.size.width + yOffset : frontContainerView.bounds.size.width
|
||||
}
|
||||
|
||||
if let heightConstant = backContainerView.getConstraint(.Height) {
|
||||
heightConstant.constant = isOpen == true ? contentView.bounds.size.height + openSize : contentView.bounds.size.height
|
||||
heightConstant.constant = isOpen == true ? frontContainerView.bounds.size.height + yOffset : frontContainerView.bounds.size.height
|
||||
}
|
||||
|
||||
configurationCell()
|
||||
|
||||
|
||||
if animated == true {
|
||||
UIView.animateWithDuration(0.3, delay: 0, options: .CurveEaseInOut, animations: {
|
||||
self.contentView.layoutIfNeeded()
|
||||
@@ -150,6 +181,31 @@ extension BasePageCollectionCell {
|
||||
|
||||
return shadow
|
||||
}
|
||||
|
||||
|
||||
func configurationCell() {
|
||||
// Prevents indefinite growing of the cell issue
|
||||
let i: CGFloat = self.isOpened ? 1 : -1
|
||||
let superHeight = superview?.frame.size.height ?? 0
|
||||
|
||||
frame.size.height += i * superHeight
|
||||
frame.origin.y -= i * superHeight / 2
|
||||
frame.origin.x -= i * yOffset / 2
|
||||
frame.size.width += i * yOffset
|
||||
}
|
||||
|
||||
|
||||
func configureCellViewConstraintsWithSize(size: CGSize) {
|
||||
guard isOpened == false && frontContainerView.getConstraint(.Width)?.constant != size.width else { return }
|
||||
|
||||
[frontContainerView, backContainerView].forEach {
|
||||
let constraintWidth = $0.getConstraint(.Width)
|
||||
constraintWidth?.constant = size.width
|
||||
|
||||
let constraintHeight = $0.getConstraint(.Height)
|
||||
constraintHeight?.constant = size.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: NSCoding
|
||||
|
||||
@@ -8,17 +8,28 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
/// UIViewController with UICollectionView with custom transition method
|
||||
public class ExpandingViewController: UIViewController {
|
||||
|
||||
/// The default size to use for cells.
|
||||
public var itemSize = CGSize(width: 256, height: 335)
|
||||
|
||||
/// The collection view object managed by this view controller.
|
||||
public var collectionView: UICollectionView?
|
||||
|
||||
private var transitionDriver: TransitionDriver?
|
||||
|
||||
/// Index of current cell
|
||||
public var currentIndex: Int {
|
||||
guard let collectionView = self.collectionView else { return 0 }
|
||||
|
||||
let startOffset = (collectionView.bounds.size.width - itemSize.width) / 2
|
||||
return Int((collectionView.contentOffset.x + startOffset) / (itemSize.width + 25))
|
||||
guard let collectionLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout else {
|
||||
return 0
|
||||
}
|
||||
|
||||
let minimumLineSpacing = collectionLayout.minimumLineSpacing
|
||||
return Int((collectionView.contentOffset.x + startOffset + itemSize.width / 2) / (itemSize.width + minimumLineSpacing))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,18 +47,28 @@ extension ExpandingViewController {
|
||||
|
||||
public extension ExpandingViewController {
|
||||
|
||||
/**
|
||||
Pushes a view controller onto the receiver’s stack and updates the display with custom animation.
|
||||
|
||||
- parameter viewController: The table view controller to push onto the stack.
|
||||
*/
|
||||
func pushToViewController(viewController: ExpandingTableViewController) {
|
||||
guard let collectionView = self.collectionView else {
|
||||
guard let collectionView = self.collectionView,
|
||||
let navigationController = self.navigationController else {
|
||||
return
|
||||
}
|
||||
|
||||
viewController.transitionDriver = transitionDriver
|
||||
let insets = viewController.automaticallyAdjustsScrollViewInsets
|
||||
let tabBarHeight = insets == true ? navigationController.navigationBar.frame.size.height : 0
|
||||
let stausBarHeight = insets == true ? UIApplication.sharedApplication().statusBarFrame.size.height : 0
|
||||
let backImage = getBackImage(viewController, headerHeight: viewController.headerHeight)
|
||||
|
||||
transitionDriver?.pushTransitionAnimationIndex(currentIndex,
|
||||
collecitionView: collectionView,
|
||||
backImage: backImage,
|
||||
headerHeight: viewController.headerHeight) { headerView in
|
||||
headerHeight: viewController.headerHeight,
|
||||
insets: tabBarHeight + stausBarHeight) { headerView in
|
||||
viewController.tableView.tableHeaderView = headerView
|
||||
self.navigationController?.pushViewController(viewController, animated: false)
|
||||
}
|
||||
@@ -84,8 +105,15 @@ extension ExpandingViewController {
|
||||
|
||||
// MARK: UICollectionViewDataSource
|
||||
|
||||
extension ExpandingViewController: UICollectionViewDataSource, UICollectionViewDelegate{
|
||||
extension ExpandingViewController: UICollectionViewDataSource, UICollectionViewDelegate {
|
||||
|
||||
public func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
guard case let cell as BasePageCollectionCell = cell else {
|
||||
return
|
||||
}
|
||||
|
||||
cell.configureCellViewConstraintsWithSize(itemSize)
|
||||
}
|
||||
public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
fatalError("need emplementation in subclass")
|
||||
}
|
||||
@@ -95,3 +123,15 @@ extension ExpandingViewController: UICollectionViewDataSource, UICollectionViewD
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIScrollViewDelegate
|
||||
|
||||
extension ExpandingViewController {
|
||||
|
||||
public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
|
||||
let indexPath = NSIndexPath(forRow: currentIndex, inSection: 0)
|
||||
if case let currentCell as BasePageCollectionCell = collectionView?.cellForItemAtIndexPath(indexPath) {
|
||||
currentCell.configurationCell()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ extension TransitionDriver {
|
||||
collecitionView: UICollectionView,
|
||||
backImage: UIImage?,
|
||||
headerHeight: CGFloat,
|
||||
insets: CGFloat,
|
||||
completion: UIView -> Void) {
|
||||
|
||||
guard case let cell as BasePageCollectionCell = collecitionView.cellForItemAtIndexPath(NSIndexPath(forRow: currentIndex, inSection: 0)),
|
||||
@@ -60,8 +61,8 @@ extension TransitionDriver {
|
||||
configurateCell(copyView, backImage: backImage)
|
||||
backImageView = addImageToView(copyView.backContainerView, image: backImage)
|
||||
|
||||
openBackViewConfigureConstraints(copyView, height: headerHeight)
|
||||
openFrontViewConfigureConstraints(copyView, height: headerHeight)
|
||||
openBackViewConfigureConstraints(copyView, height: headerHeight, insets: insets)
|
||||
openFrontViewConfigureConstraints(copyView, height: headerHeight, insets: insets)
|
||||
|
||||
// corner animation
|
||||
copyView.backContainerView.animationCornerRadius(0, duration: duration)
|
||||
@@ -188,7 +189,7 @@ extension TransitionDriver {
|
||||
|
||||
extension TransitionDriver {
|
||||
|
||||
private func openFrontViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat) {
|
||||
private func openFrontViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat, insets: CGFloat) {
|
||||
|
||||
if let heightConstraint = cell.frontContainerView.getConstraint(.Height) {
|
||||
frontViewFrame.size.height = heightConstraint.constant
|
||||
@@ -201,10 +202,10 @@ extension TransitionDriver {
|
||||
}
|
||||
|
||||
frontViewFrame.origin.y = cell.frontConstraintY.constant
|
||||
cell.frontConstraintY.constant = -view.bounds.size.height / 2 + height / 2
|
||||
cell.frontConstraintY.constant = -view.bounds.size.height / 2 + height / 2 + insets
|
||||
}
|
||||
|
||||
private func openBackViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat) {
|
||||
private func openBackViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat, insets: CGFloat) {
|
||||
|
||||
if let heightConstraint = cell.backContainerView.getConstraint(.Height) {
|
||||
backViewFrame.size.height = heightConstraint.constant
|
||||
@@ -217,7 +218,7 @@ extension TransitionDriver {
|
||||
}
|
||||
|
||||
backViewFrame.origin.y = cell.backConstraintY.constant
|
||||
cell.backConstraintY.constant = view.bounds.size.height / 2 - (view.bounds.size.height - 236) / 2
|
||||
cell.backConstraintY.constant = view.bounds.size.height / 2 - (view.bounds.size.height - 236) / 2 + insets
|
||||
}
|
||||
|
||||
private func closeBackViewConfigurationConstraints(cell: BasePageCollectionCell?) {
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<!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">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">DemoExpandingCollection 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingViewController.html">ExpandingViewController</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:C23DemoExpandingCollection28ExpandingTableViewController"></a>
|
||||
<a name="//apple_ref/swift/Class/ExpandingTableViewController" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection28ExpandingTableViewController">ExpandingTableViewController</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Base class for UITableViewcontroller which have back transition method</p>
|
||||
|
||||
<a href="Classes/ExpandingTableViewController.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">ExpandingTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C23DemoExpandingCollection23ExpandingViewController"></a>
|
||||
<a name="//apple_ref/swift/Class/ExpandingViewController" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection23ExpandingViewController">ExpandingViewController</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIViewController with UICollectionView with custom transition method</p>
|
||||
|
||||
<a href="Classes/ExpandingViewController.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">ExpandingViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C23DemoExpandingCollection22BasePageCollectionCell"></a>
|
||||
<a name="//apple_ref/swift/Class/BasePageCollectionCell" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection22BasePageCollectionCell">BasePageCollectionCell</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Base class for UICollectionViewCell</p>
|
||||
|
||||
<a href="Classes/BasePageCollectionCell.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">BasePageCollectionCell</span><span class="p">:</span> <span class="kt">UICollectionViewCell</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-10)</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,374 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>BasePageCollectionCell 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/BasePageCollectionCell" class="dashAnchor"></a>
|
||||
<a title="BasePageCollectionCell Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
BasePageCollectionCell 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>BasePageCollectionCell</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">BasePageCollectionCell</span><span class="p">:</span> <span class="kt">UICollectionViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Base class for UICollectionViewCell</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell7yOffsetV12CoreGraphics7CGFloat"></a>
|
||||
<a name="//apple_ref/swift/Property/yOffset" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell7yOffsetV12CoreGraphics7CGFloat">yOffset</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Animation oposition offset when cell is 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">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">yOffset</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">40</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Vars"></a>
|
||||
<a name="//apple_ref/swift/Section/Vars" class="dashAnchor"></a>
|
||||
<a href="#/Vars">
|
||||
<h3 class="section-name">Vars</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell18frontContainerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/frontContainerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell18frontContainerViewXwGSQCSo6UIView_">frontContainerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The view used as the face of the cell must connectid from xib or storyboard.</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">frontContainerView</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:vC23DemoExpandingCollection22BasePageCollectionCell17backContainerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/backContainerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell17backContainerViewXwGSQCSo6UIView_">backContainerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The view used as the back of the cell must connectid from xib or storyboard.</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">backContainerView</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:vC23DemoExpandingCollection22BasePageCollectionCell15backConstraintYXwGSQCSo18NSLayoutConstraint_"></a>
|
||||
<a name="//apple_ref/swift/Property/backConstraintY" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell15backConstraintYXwGSQCSo18NSLayoutConstraint_">backConstraintY</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>constraints for backContainerView must connectid from xib or storyboard</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">backConstraintY</span><span class="p">:</span> <span class="kt">NSLayoutConstraint</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell16frontConstraintYXwGSQCSo18NSLayoutConstraint_"></a>
|
||||
<a name="//apple_ref/swift/Property/frontConstraintY" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell16frontConstraintYXwGSQCSo18NSLayoutConstraint_">frontConstraintY</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>constraints for frontContainerView must connectid from xib or storyboard</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">frontConstraintY</span><span class="p">:</span> <span class="kt">NSLayoutConstraint</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell8isOpenedSb"></a>
|
||||
<a name="//apple_ref/swift/Property/isOpened" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell8isOpenedSb">isOpened</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A Boolean value that indicates whether the cell is opened.</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="k">var</span> <span class="nv">isOpened</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/inits"></a>
|
||||
<a name="//apple_ref/swift/Section/inits" class="dashAnchor"></a>
|
||||
<a href="#/inits">
|
||||
<h3 class="section-name">inits</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection22BasePageCollectionCellcFT5coderCSo7NSCoder_GSqS0__"></a>
|
||||
<a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection22BasePageCollectionCellcFT5coderCSo7NSCoder_GSqS0__">init(coder:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initializes a UICollectionViewCell from data in a given unarchiver.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">required</span> <span class="kd">public</span> <span class="nf">init</span><span class="p">?(</span><span class="n">coder</span> <span class="nv">aDecoder</span><span class="p">:</span> <span class="kt">NSCoder</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>aDecoder</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>An unarchiver object.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>An initialized UICollectionViewCell object.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection22BasePageCollectionCell10cellIsOpenFTSb8animatedSb_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/cellIsOpen(_:animated:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection22BasePageCollectionCell10cellIsOpenFTSb8animatedSb_T_">cellIsOpen(_:animated:)</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">cellIsOpen</span><span class="p">(</span><span class="nv">isOpen</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="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>isOpen</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Contains the value true if the cell should display open state, if false should display close state.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>animated</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Set to true if the change in selection state is animated.</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-10)</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,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ExpandingTableViewController 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/ExpandingTableViewController" class="dashAnchor"></a>
|
||||
<a title="ExpandingTableViewController Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
ExpandingTableViewController 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>ExpandingTableViewController</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ExpandingTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Base class for UITableViewcontroller which have back transition method</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Vars"></a>
|
||||
<a name="//apple_ref/swift/Section/Vars" class="dashAnchor"></a>
|
||||
<a href="#/Vars">
|
||||
<h3 class="section-name">Vars</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection28ExpandingTableViewController12headerHeightV12CoreGraphics7CGFloat"></a>
|
||||
<a name="//apple_ref/swift/Property/headerHeight" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection28ExpandingTableViewController12headerHeightV12CoreGraphics7CGFloat">headerHeight</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The height of the table view header</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="k">var</span> <span class="nv">headerHeight</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">236</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection28ExpandingTableViewController22popTransitionAnimationFT_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/popTransitionAnimation()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection28ExpandingTableViewController22popTransitionAnimationFT_T_">popTransitionAnimation()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Pops the top view controller from the navigation stack and updates the display with custom animation.</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">popTransitionAnimation</span><span class="p">()</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-10)</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,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ExpandingViewController 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/ExpandingViewController" class="dashAnchor"></a>
|
||||
<a title="ExpandingViewController Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
ExpandingViewController 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>ExpandingViewController</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ExpandingViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>UIViewController with UICollectionView with custom transition method</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController8itemSizeVSC6CGSize"></a>
|
||||
<a name="//apple_ref/swift/Property/itemSize" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController8itemSizeVSC6CGSize">itemSize</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The default size to use for cells.</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="k">var</span> <span class="nv">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">256</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">335</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController14collectionViewGSqCSo16UICollectionView_"></a>
|
||||
<a name="//apple_ref/swift/Property/collectionView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController14collectionViewGSqCSo16UICollectionView_">collectionView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The collection view object managed by this view controller.</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="k">var</span> <span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController12currentIndexSi"></a>
|
||||
<a name="//apple_ref/swift/Property/currentIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController12currentIndexSi">currentIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Index of current 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="k">var</span> <span class="nv">currentIndex</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection23ExpandingViewController20pushToViewControllerFCS_28ExpandingTableViewControllerT_"></a>
|
||||
<a name="//apple_ref/swift/Method/pushToViewController(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection23ExpandingViewController20pushToViewControllerFCS_28ExpandingTableViewControllerT_">pushToViewController(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Pushes a view controller onto the receiver’s stack and updates the display with custom animation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">pushToViewController</span><span class="p">(</span><span class="nv">viewController</span><span class="p">:</span> <span class="kt">ExpandingTableViewController</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>viewController</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The table view controller to push onto the stack.</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-10)</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.demoexpandingcollection</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>DemoExpandingCollection</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,159 @@
|
||||
<!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">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">DemoExpandingCollection 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingViewController.html">ExpandingViewController</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:C23DemoExpandingCollection28ExpandingTableViewController"></a>
|
||||
<a name="//apple_ref/swift/Class/ExpandingTableViewController" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection28ExpandingTableViewController">ExpandingTableViewController</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Base class for UITableViewcontroller which have back transition method</p>
|
||||
|
||||
<a href="Classes/ExpandingTableViewController.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">ExpandingTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C23DemoExpandingCollection23ExpandingViewController"></a>
|
||||
<a name="//apple_ref/swift/Class/ExpandingViewController" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection23ExpandingViewController">ExpandingViewController</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>UIViewController with UICollectionView with custom transition method</p>
|
||||
|
||||
<a href="Classes/ExpandingViewController.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">ExpandingViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C23DemoExpandingCollection22BasePageCollectionCell"></a>
|
||||
<a name="//apple_ref/swift/Class/BasePageCollectionCell" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C23DemoExpandingCollection22BasePageCollectionCell">BasePageCollectionCell</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Base class for UICollectionViewCell</p>
|
||||
|
||||
<a href="Classes/BasePageCollectionCell.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">BasePageCollectionCell</span><span class="p">:</span> <span class="kt">UICollectionViewCell</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-10)</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,374 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>BasePageCollectionCell 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/BasePageCollectionCell" class="dashAnchor"></a>
|
||||
<a title="BasePageCollectionCell Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
BasePageCollectionCell 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>BasePageCollectionCell</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">BasePageCollectionCell</span><span class="p">:</span> <span class="kt">UICollectionViewCell</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Base class for UICollectionViewCell</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell7yOffsetV12CoreGraphics7CGFloat"></a>
|
||||
<a name="//apple_ref/swift/Property/yOffset" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell7yOffsetV12CoreGraphics7CGFloat">yOffset</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Animation oposition offset when cell is 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">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">yOffset</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">40</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Vars"></a>
|
||||
<a name="//apple_ref/swift/Section/Vars" class="dashAnchor"></a>
|
||||
<a href="#/Vars">
|
||||
<h3 class="section-name">Vars</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell18frontContainerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/frontContainerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell18frontContainerViewXwGSQCSo6UIView_">frontContainerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The view used as the face of the cell must connectid from xib or storyboard.</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">frontContainerView</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:vC23DemoExpandingCollection22BasePageCollectionCell17backContainerViewXwGSQCSo6UIView_"></a>
|
||||
<a name="//apple_ref/swift/Property/backContainerView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell17backContainerViewXwGSQCSo6UIView_">backContainerView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The view used as the back of the cell must connectid from xib or storyboard.</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">backContainerView</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:vC23DemoExpandingCollection22BasePageCollectionCell15backConstraintYXwGSQCSo18NSLayoutConstraint_"></a>
|
||||
<a name="//apple_ref/swift/Property/backConstraintY" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell15backConstraintYXwGSQCSo18NSLayoutConstraint_">backConstraintY</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>constraints for backContainerView must connectid from xib or storyboard</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">backConstraintY</span><span class="p">:</span> <span class="kt">NSLayoutConstraint</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell16frontConstraintYXwGSQCSo18NSLayoutConstraint_"></a>
|
||||
<a name="//apple_ref/swift/Property/frontConstraintY" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell16frontConstraintYXwGSQCSo18NSLayoutConstraint_">frontConstraintY</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>constraints for frontContainerView must connectid from xib or storyboard</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="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">frontConstraintY</span><span class="p">:</span> <span class="kt">NSLayoutConstraint</span><span class="o">!</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection22BasePageCollectionCell8isOpenedSb"></a>
|
||||
<a name="//apple_ref/swift/Property/isOpened" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection22BasePageCollectionCell8isOpenedSb">isOpened</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A Boolean value that indicates whether the cell is opened.</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="k">var</span> <span class="nv">isOpened</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/inits"></a>
|
||||
<a name="//apple_ref/swift/Section/inits" class="dashAnchor"></a>
|
||||
<a href="#/inits">
|
||||
<h3 class="section-name">inits</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection22BasePageCollectionCellcFT5coderCSo7NSCoder_GSqS0__"></a>
|
||||
<a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection22BasePageCollectionCellcFT5coderCSo7NSCoder_GSqS0__">init(coder:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Initializes a UICollectionViewCell from data in a given unarchiver.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">required</span> <span class="kd">public</span> <span class="nf">init</span><span class="p">?(</span><span class="n">coder</span> <span class="nv">aDecoder</span><span class="p">:</span> <span class="kt">NSCoder</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>aDecoder</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>An unarchiver object.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>An initialized UICollectionViewCell object.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection22BasePageCollectionCell10cellIsOpenFTSb8animatedSb_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/cellIsOpen(_:animated:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection22BasePageCollectionCell10cellIsOpenFTSb8animatedSb_T_">cellIsOpen(_:animated:)</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">cellIsOpen</span><span class="p">(</span><span class="nv">isOpen</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="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>isOpen</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Contains the value true if the cell should display open state, if false should display close state.</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>animated</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Set to true if the change in selection state is animated.</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-10)</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,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ExpandingTableViewController 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/ExpandingTableViewController" class="dashAnchor"></a>
|
||||
<a title="ExpandingTableViewController Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
ExpandingTableViewController 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>ExpandingTableViewController</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ExpandingTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Base class for UITableViewcontroller which have back transition method</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Vars"></a>
|
||||
<a name="//apple_ref/swift/Section/Vars" class="dashAnchor"></a>
|
||||
<a href="#/Vars">
|
||||
<h3 class="section-name">Vars</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection28ExpandingTableViewController12headerHeightV12CoreGraphics7CGFloat"></a>
|
||||
<a name="//apple_ref/swift/Property/headerHeight" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection28ExpandingTableViewController12headerHeightV12CoreGraphics7CGFloat">headerHeight</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The height of the table view header</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="k">var</span> <span class="nv">headerHeight</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">236</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection28ExpandingTableViewController22popTransitionAnimationFT_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/popTransitionAnimation()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection28ExpandingTableViewController22popTransitionAnimationFT_T_">popTransitionAnimation()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Pops the top view controller from the navigation stack and updates the display with custom animation.</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">popTransitionAnimation</span><span class="p">()</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-10)</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,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ExpandingViewController 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/ExpandingViewController" class="dashAnchor"></a>
|
||||
<a title="ExpandingViewController Class Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="../index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="../index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="../img/carat.png" />
|
||||
ExpandingViewController 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="../Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
<h1>ExpandingViewController</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ExpandingViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>UIViewController with UICollectionView with custom transition method</p>
|
||||
|
||||
</section>
|
||||
<section class="section task-group-section">
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController8itemSizeVSC6CGSize"></a>
|
||||
<a name="//apple_ref/swift/Property/itemSize" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController8itemSizeVSC6CGSize">itemSize</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The default size to use for cells.</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="k">var</span> <span class="nv">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">256</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">335</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController14collectionViewGSqCSo16UICollectionView_"></a>
|
||||
<a name="//apple_ref/swift/Property/collectionView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController14collectionViewGSqCSo16UICollectionView_">collectionView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The collection view object managed by this view controller.</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="k">var</span> <span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC23DemoExpandingCollection23ExpandingViewController12currentIndexSi"></a>
|
||||
<a name="//apple_ref/swift/Property/currentIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC23DemoExpandingCollection23ExpandingViewController12currentIndexSi">currentIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Index of current 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="k">var</span> <span class="nv">currentIndex</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC23DemoExpandingCollection23ExpandingViewController20pushToViewControllerFCS_28ExpandingTableViewControllerT_"></a>
|
||||
<a name="//apple_ref/swift/Method/pushToViewController(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC23DemoExpandingCollection23ExpandingViewController20pushToViewControllerFCS_28ExpandingTableViewControllerT_">pushToViewController(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Pushes a view controller onto the receiver’s stack and updates the display with custom animation.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">pushToViewController</span><span class="p">(</span><span class="nv">viewController</span><span class="p">:</span> <span class="kt">ExpandingTableViewController</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>viewController</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The table view controller to push onto the stack.</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-10)</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,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>DemoExpandingCollection 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="DemoExpandingCollection Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
DemoExpandingCollection 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/header.png" alt="header"></p>
|
||||
<a href='#expanding_collection' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='expanding_collection'>expanding-collection</h1>
|
||||
|
||||
<p><a href="http://twitter.com/Ramotion"><img src="https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat" alt="Twitter"></a>
|
||||
<a href="https://cocoapods.org/pods/expanding-collection"><img src="https://img.shields.io/cocoapods/p/expanding-collection.svg" alt="CocoaPods"></a>
|
||||
<a href="http://cocoapods.org/pods/expanding-collection"><img src="https://img.shields.io/cocoapods/v/expanding-collection.svg" alt="CocoaPods"></a>
|
||||
<a href="https://cdn.rawgit.com/Ramotion/expanding-collection/master/docs/index.html"><img src="https://img.shields.io/cocoapods/metrics/doc-percent/expanding-collection.svg" alt="CocoaPods"></a></p>
|
||||
|
||||
<p><a href="https://github.com/Ramotion/expanding-collection"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a>
|
||||
<a href="https://travis-ci.org/Ramotion/elastic-pull-to-update"><img src="https://travis-ci.org/Ramotion/elastic-pull-to-update.svg?branch=master" alt="Travis"></a>
|
||||
<a href="https://codebeat.co/projects/github-com-ramotion-expanding-collection"><img src="https://codebeat.co/badges/6a009992-5bf2-4730-aa35-f3b20ce7693d" alt="codebeat badge"></a></p>
|
||||
|
||||
<p><a href="https://dribbble.com/shots/2741477-iOS-Expanding-Collection-Open-Source">shot on dribbble</a>:
|
||||
<img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/preview.gif" alt="Animation"></p>
|
||||
|
||||
<p>The <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">iPhone mockup</a> available <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">here</a>.</p>
|
||||
<a href='#requirements' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='requirements'>Requirements</h2>
|
||||
|
||||
<ul>
|
||||
<li>iOS 8.0+</li>
|
||||
<li>Xcode 7.3</li>
|
||||
</ul>
|
||||
<a href='#installation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='installation'>Installation</h2>
|
||||
|
||||
<p>Just add the Source folder to your project.</p>
|
||||
|
||||
<p>or use <a href="https://cocoapods.org">CocoaPods</a> with Podfile:
|
||||
<code>ruby
|
||||
pod 'expanding-collection'
|
||||
</code>
|
||||
or <a href="https://github.com/Carthage/Carthage">Carthage</a> users can simply add to their <code>Cartfile</code>:
|
||||
<code>
|
||||
github "Ramotion/expanding-collection"
|
||||
</code></p>
|
||||
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2>
|
||||
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">ExpandingCollection</span>
|
||||
</code></pre>
|
||||
<a href='#create_collectionviewcell' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='create_collectionviewcell'>Create CollectionViewCell</h4>
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/images/image2.png" alt="cell"></p>
|
||||
|
||||
<p>1) Create UICollectionViewCell inherit from <code>BasePageCollectionCell</code> (recommend create cell with xib file)</p>
|
||||
|
||||
<p>2) Adding FrontView
|
||||
- add a view to YOURCELL.xib and connect it to <code>@IBOutlet weak var frontContainerView: UIView!</code><br>
|
||||
- add width, height, centerX and centerY constraints (width and height constranints must equal cellSize)</p>
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/images/image1.png" alt="cell"><br>
|
||||
- connect centerY constraint to <code>@IBOutlet weak var frontConstraintY: NSLayoutConstraint!</code>
|
||||
- add any desired uiviews to frontView</p>
|
||||
|
||||
<p>3) Adding BackView
|
||||
- repeat step 2 (connect outlets to <code>@IBOutlet weak var backContainerView: UIView!</code>, <code>@IBOutlet weak var backConstraintY: NSLayoutConstraint!</code>)</p>
|
||||
|
||||
<p>4) Cell example <a href="https://github.com/Ramotion/expanding-collection/tree/master/DemoExpandingCollection/DemoExpandingCollection/ViewControllers/DemoViewController/Cells">DemoCell</a></p>
|
||||
<a href='#if_set_code_tag_101_code_for_any_code_frontview_subviews_code_this_view_will_be_hidden_during_the_transition_animation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='if_set_code_tag_101_code_for_any_code_frontview_subviews_code_this_view_will_be_hidden_during_the_transition_animation'>If set <code>tag = 101</code> for any <code>FrontView.subviews</code> this view will be hidden during the transition animation</h6>
|
||||
<a href='#create_collectionviewcontroller' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='create_collectionviewcontroller'>Create CollectionViewController</h4>
|
||||
|
||||
<p>1) Create a UIViewController inheriting from <code>ExpandingViewController</code></p>
|
||||
|
||||
<p>2) Register Cell and set Cell size:</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="n">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">214</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">264</span><span class="p">)</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
|
||||
<span class="c1">// register cell</span>
|
||||
<span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="kt">UINib</span><span class="p">(</span><span class="nv">nibName</span><span class="p">:</span> <span class="s">"NibName"</span><span class="p">,</span> <span class="nv">bundle</span><span class="p">:</span> <span class="kc">nil</span><span class="p">)</span>
|
||||
<span class="n">collectionView</span><span class="p">?</span><span class="o">.</span><span class="nf">registerNib</span><span class="p">(</span><span class="n">nib</span><span class="p">,</span> <span class="nv">forCellWithReuseIdentifier</span><span class="p">:</span> <span class="s">"CellIdentifier"</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>3) Add UICollectionViewDataSource methods</p>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YourViewController</span> <span class="p">{</span>
|
||||
|
||||
<span class="k">override</span> <span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">numberOfItemsInSection</span> <span class="nv">section</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Int</span> <span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">items</span><span class="o">.</span><span class="n">count</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="k">override</span> <span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">cellForItemAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="o">-></span> <span class="kt">UICollectionViewCell</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">cell</span> <span class="o">=</span> <span class="n">collectionView</span><span class="o">.</span><span class="nf">dequeueReusableCellWithReuseIdentifier</span><span class="p">(</span><span class="s">"CellIdentifier"</span><span class="p">),</span> <span class="nv">forIndexPath</span><span class="p">:</span> <span class="n">indexPath</span><span class="p">)</span>
|
||||
<span class="c1">// configure cell</span>
|
||||
<span class="k">return</span> <span class="n">cell</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>4) Open Cell animation</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="n">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">214</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">264</span><span class="p">)</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
|
||||
<span class="c1">// register cell</span>
|
||||
<span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="kt">UINib</span><span class="p">(</span><span class="nv">nibName</span><span class="p">:</span> <span class="s">"CellIdentifier"</span><span class="p">,</span> <span class="nv">bundle</span><span class="p">:</span> <span class="kc">nil</span><span class="p">)</span>
|
||||
<span class="n">collectionView</span><span class="p">?</span><span class="o">.</span><span class="nf">registerNib</span><span class="p">(</span><span class="n">nib</span><span class="p">,</span> <span class="nv">forCellWithReuseIdentifier</span><span class="p">:</span> <span class="kt">String</span><span class="p">(</span><span class="kt">DemoCollectionViewCell</span><span class="p">))</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">didSelectItemAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">cell</span><span class="o">.</span><span class="nf">cellIsOpen</span><span class="p">(</span><span class="o">!</span><span class="n">cell</span><span class="o">.</span><span class="n">isOpened</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
<a href='#if_you_use_this_delegates_method' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='if_you_use_this_delegates_method'>if you use this delegates method:</h6>
|
||||
<pre class="highlight plaintext"><code>func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath)
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView)
|
||||
</code></pre>
|
||||
<a href='#must_call_super_method' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='must_call_super_method'>must call super method:</h6>
|
||||
<pre class="highlight plaintext"><code>func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
super.collectionView(collectionView: collectionView, willDisplayCell cell: cell, forItemAtIndexPath indexPath: indexPath)
|
||||
// code
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
|
||||
super.scrollViewDidEndDecelerating(scrollView: scrollView)
|
||||
// code
|
||||
}
|
||||
</code></pre>
|
||||
<a href='#transition_animation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='transition_animation'>Transition animation</h4>
|
||||
|
||||
<p>1) Create a UITableViewController inheriting from <code>ExpandingTableViewController</code></p>
|
||||
|
||||
<p>2) Set header height default 236</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
<span class="n">headerHeight</span> <span class="o">=</span> <span class="o">***</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>3) Call the push method in YourViewController to YourTableViewController</p>
|
||||
<pre class="highlight swift"><code> <span class="k">if</span> <span class="n">cell</span><span class="o">.</span><span class="n">isOpened</span> <span class="o">==</span> <span class="kc">true</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">vc</span><span class="p">:</span> <span class="kt">YourTableViewController</span> <span class="o">=</span> <span class="c1">// ... create view controller </span>
|
||||
<span class="nf">pushToViewController</span><span class="p">(</span><span class="n">vc</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>4) For back transition use <code>popTransitionAnimation()</code></p>
|
||||
<a href='#license' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='license'>License</h2>
|
||||
|
||||
<p>Expanding collection is released under the MIT license.
|
||||
See <a href="./LICENSE">LICENSE</a> for details.</p>
|
||||
<a href='#about' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='about'>About</h2>
|
||||
|
||||
<p>The project maintained by <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">app development agency</a> <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">Ramotion Inc.</a>
|
||||
See our other <a href="https://github.com/ramotion">open-source projects</a> or <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">hire</a> us to design, develop, and grow your product.</p>
|
||||
|
||||
<p><a href="https://twitter.com/intent/tweet?text=https://github.com/ramotion/expanding-collection"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social" alt="Twitter URL"></a>
|
||||
<a href="https://twitter.com/ramotion"><img src="https://img.shields.io/twitter/follow/ramotion.svg?style=social" alt="Twitter Follow"></a></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-10)</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();
|
||||
});
|
||||
|
After Width: | Height: | Size: 274 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>DemoExpandingCollection 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="DemoExpandingCollection Reference"></a>
|
||||
<header>
|
||||
<div class="content-wrapper">
|
||||
<p><a href="index.html">DemoExpandingCollection Docs</a> (100% documented)</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
<p id="breadcrumbs">
|
||||
<a href="index.html">DemoExpandingCollection Reference</a>
|
||||
<img id="carat" src="img/carat.png" />
|
||||
DemoExpandingCollection 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/BasePageCollectionCell.html">BasePageCollectionCell</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingTableViewController.html">ExpandingTableViewController</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a href="Classes/ExpandingViewController.html">ExpandingViewController</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
<section>
|
||||
<section class="section">
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/header.png" alt="header"></p>
|
||||
<a href='#expanding_collection' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='expanding_collection'>expanding-collection</h1>
|
||||
|
||||
<p><a href="http://twitter.com/Ramotion"><img src="https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat" alt="Twitter"></a>
|
||||
<a href="https://cocoapods.org/pods/expanding-collection"><img src="https://img.shields.io/cocoapods/p/expanding-collection.svg" alt="CocoaPods"></a>
|
||||
<a href="http://cocoapods.org/pods/expanding-collection"><img src="https://img.shields.io/cocoapods/v/expanding-collection.svg" alt="CocoaPods"></a>
|
||||
<a href="https://cdn.rawgit.com/Ramotion/expanding-collection/master/docs/index.html"><img src="https://img.shields.io/cocoapods/metrics/doc-percent/expanding-collection.svg" alt="CocoaPods"></a></p>
|
||||
|
||||
<p><a href="https://github.com/Ramotion/expanding-collection"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a>
|
||||
<a href="https://travis-ci.org/Ramotion/elastic-pull-to-update"><img src="https://travis-ci.org/Ramotion/elastic-pull-to-update.svg?branch=master" alt="Travis"></a>
|
||||
<a href="https://codebeat.co/projects/github-com-ramotion-expanding-collection"><img src="https://codebeat.co/badges/6a009992-5bf2-4730-aa35-f3b20ce7693d" alt="codebeat badge"></a></p>
|
||||
|
||||
<p><a href="https://dribbble.com/shots/2741477-iOS-Expanding-Collection-Open-Source">shot on dribbble</a>:
|
||||
<img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/preview.gif" alt="Animation"></p>
|
||||
|
||||
<p>The <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">iPhone mockup</a> available <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">here</a>.</p>
|
||||
<a href='#requirements' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='requirements'>Requirements</h2>
|
||||
|
||||
<ul>
|
||||
<li>iOS 8.0+</li>
|
||||
<li>Xcode 7.3</li>
|
||||
</ul>
|
||||
<a href='#installation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='installation'>Installation</h2>
|
||||
|
||||
<p>Just add the Source folder to your project.</p>
|
||||
|
||||
<p>or use <a href="https://cocoapods.org">CocoaPods</a> with Podfile:
|
||||
<code>ruby
|
||||
pod 'expanding-collection'
|
||||
</code>
|
||||
or <a href="https://github.com/Carthage/Carthage">Carthage</a> users can simply add to their <code>Cartfile</code>:
|
||||
<code>
|
||||
github "Ramotion/expanding-collection"
|
||||
</code></p>
|
||||
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2>
|
||||
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">ExpandingCollection</span>
|
||||
</code></pre>
|
||||
<a href='#create_collectionviewcell' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='create_collectionviewcell'>Create CollectionViewCell</h4>
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/images/image2.png" alt="cell"></p>
|
||||
|
||||
<p>1) Create UICollectionViewCell inherit from <code>BasePageCollectionCell</code> (recommend create cell with xib file)</p>
|
||||
|
||||
<p>2) Adding FrontView
|
||||
- add a view to YOURCELL.xib and connect it to <code>@IBOutlet weak var frontContainerView: UIView!</code><br>
|
||||
- add width, height, centerX and centerY constraints (width and height constranints must equal cellSize)</p>
|
||||
|
||||
<p><img src="https://raw.githubusercontent.com/Ramotion/expanding-collection/master/images/image1.png" alt="cell"><br>
|
||||
- connect centerY constraint to <code>@IBOutlet weak var frontConstraintY: NSLayoutConstraint!</code>
|
||||
- add any desired uiviews to frontView</p>
|
||||
|
||||
<p>3) Adding BackView
|
||||
- repeat step 2 (connect outlets to <code>@IBOutlet weak var backContainerView: UIView!</code>, <code>@IBOutlet weak var backConstraintY: NSLayoutConstraint!</code>)</p>
|
||||
|
||||
<p>4) Cell example <a href="https://github.com/Ramotion/expanding-collection/tree/master/DemoExpandingCollection/DemoExpandingCollection/ViewControllers/DemoViewController/Cells">DemoCell</a></p>
|
||||
<a href='#if_set_code_tag_101_code_for_any_code_frontview_subviews_code_this_view_will_be_hidden_during_the_transition_animation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='if_set_code_tag_101_code_for_any_code_frontview_subviews_code_this_view_will_be_hidden_during_the_transition_animation'>If set <code>tag = 101</code> for any <code>FrontView.subviews</code> this view will be hidden during the transition animation</h6>
|
||||
<a href='#create_collectionviewcontroller' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='create_collectionviewcontroller'>Create CollectionViewController</h4>
|
||||
|
||||
<p>1) Create a UIViewController inheriting from <code>ExpandingViewController</code></p>
|
||||
|
||||
<p>2) Register Cell and set Cell size:</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="n">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">214</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">264</span><span class="p">)</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
|
||||
<span class="c1">// register cell</span>
|
||||
<span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="kt">UINib</span><span class="p">(</span><span class="nv">nibName</span><span class="p">:</span> <span class="s">"NibName"</span><span class="p">,</span> <span class="nv">bundle</span><span class="p">:</span> <span class="kc">nil</span><span class="p">)</span>
|
||||
<span class="n">collectionView</span><span class="p">?</span><span class="o">.</span><span class="nf">registerNib</span><span class="p">(</span><span class="n">nib</span><span class="p">,</span> <span class="nv">forCellWithReuseIdentifier</span><span class="p">:</span> <span class="s">"CellIdentifier"</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>3) Add UICollectionViewDataSource methods</p>
|
||||
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YourViewController</span> <span class="p">{</span>
|
||||
|
||||
<span class="k">override</span> <span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">numberOfItemsInSection</span> <span class="nv">section</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Int</span> <span class="p">{</span>
|
||||
<span class="k">return</span> <span class="n">items</span><span class="o">.</span><span class="n">count</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="k">override</span> <span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">cellForItemAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="o">-></span> <span class="kt">UICollectionViewCell</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">cell</span> <span class="o">=</span> <span class="n">collectionView</span><span class="o">.</span><span class="nf">dequeueReusableCellWithReuseIdentifier</span><span class="p">(</span><span class="s">"CellIdentifier"</span><span class="p">),</span> <span class="nv">forIndexPath</span><span class="p">:</span> <span class="n">indexPath</span><span class="p">)</span>
|
||||
<span class="c1">// configure cell</span>
|
||||
<span class="k">return</span> <span class="n">cell</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>4) Open Cell animation</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="n">itemSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">214</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">264</span><span class="p">)</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
|
||||
<span class="c1">// register cell</span>
|
||||
<span class="k">let</span> <span class="nv">nib</span> <span class="o">=</span> <span class="kt">UINib</span><span class="p">(</span><span class="nv">nibName</span><span class="p">:</span> <span class="s">"CellIdentifier"</span><span class="p">,</span> <span class="nv">bundle</span><span class="p">:</span> <span class="kc">nil</span><span class="p">)</span>
|
||||
<span class="n">collectionView</span><span class="p">?</span><span class="o">.</span><span class="nf">registerNib</span><span class="p">(</span><span class="n">nib</span><span class="p">,</span> <span class="nv">forCellWithReuseIdentifier</span><span class="p">:</span> <span class="kt">String</span><span class="p">(</span><span class="kt">DemoCollectionViewCell</span><span class="p">))</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">collectionView</span><span class="p">(</span><span class="nv">collectionView</span><span class="p">:</span> <span class="kt">UICollectionView</span><span class="p">,</span> <span class="n">didSelectItemAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">cell</span><span class="o">.</span><span class="nf">cellIsOpen</span><span class="p">(</span><span class="o">!</span><span class="n">cell</span><span class="o">.</span><span class="n">isOpened</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
<a href='#if_you_use_this_delegates_method' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='if_you_use_this_delegates_method'>if you use this delegates method:</h6>
|
||||
<pre class="highlight plaintext"><code>func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath)
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView)
|
||||
</code></pre>
|
||||
<a href='#must_call_super_method' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h6 id='must_call_super_method'>must call super method:</h6>
|
||||
<pre class="highlight plaintext"><code>func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
super.collectionView(collectionView: collectionView, willDisplayCell cell: cell, forItemAtIndexPath indexPath: indexPath)
|
||||
// code
|
||||
}
|
||||
|
||||
func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
|
||||
super.scrollViewDidEndDecelerating(scrollView: scrollView)
|
||||
// code
|
||||
}
|
||||
</code></pre>
|
||||
<a href='#transition_animation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h4 id='transition_animation'>Transition animation</h4>
|
||||
|
||||
<p>1) Create a UITableViewController inheriting from <code>ExpandingTableViewController</code></p>
|
||||
|
||||
<p>2) Set header height default 236</p>
|
||||
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="k">super</span><span class="o">.</span><span class="nf">viewDidLoad</span><span class="p">()</span>
|
||||
<span class="n">headerHeight</span> <span class="o">=</span> <span class="o">***</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>3) Call the push method in YourViewController to YourTableViewController</p>
|
||||
<pre class="highlight swift"><code> <span class="k">if</span> <span class="n">cell</span><span class="o">.</span><span class="n">isOpened</span> <span class="o">==</span> <span class="kc">true</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">vc</span><span class="p">:</span> <span class="kt">YourTableViewController</span> <span class="o">=</span> <span class="c1">// ... create view controller </span>
|
||||
<span class="nf">pushToViewController</span><span class="p">(</span><span class="n">vc</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>4) For back transition use <code>popTransitionAnimation()</code></p>
|
||||
<a href='#license' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='license'>License</h2>
|
||||
|
||||
<p>Expanding collection is released under the MIT license.
|
||||
See <a href="./LICENSE">LICENSE</a> for details.</p>
|
||||
<a href='#about' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='about'>About</h2>
|
||||
|
||||
<p>The project maintained by <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">app development agency</a> <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">Ramotion Inc.</a>
|
||||
See our other <a href="https://github.com/ramotion">open-source projects</a> or <a href="https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection">hire</a> us to design, develop, and grow your product.</p>
|
||||
|
||||
<p><a href="https://twitter.com/intent/tweet?text=https://github.com/ramotion/expanding-collection"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social" alt="Twitter URL"></a>
|
||||
<a href="https://twitter.com/ramotion"><img src="https://img.shields.io/twitter/follow/ramotion.svg?style=social" alt="Twitter Follow"></a></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-10)</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();
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'expanding-collection'
|
||||
s.version = '0.0.1'
|
||||
s.version = '0.3.0'
|
||||
s.summary = 'Transition animtion from CollectionView to TableView'
|
||||
s.license = 'MIT'
|
||||
s.homepage = 'https://github.com/Ramotion/expanding-collection'
|
||||
|
||||
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 5.6 MiB |