Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc70562947 | ||
|
|
03704d1227 | ||
|
|
e72546bc43 | ||
|
|
436bba428a | ||
|
|
521c534a30 | ||
|
|
de19661aa5 | ||
|
|
a4d60e40f7 | ||
|
|
938a7a13c0 | ||
|
|
8c28b92a17 | ||
|
|
2c2f770889 | ||
|
|
019a239ee3 | ||
|
|
026283a303 | ||
|
|
2f3c7e32bb | ||
|
|
7ac7564fff | ||
|
|
f0ba09cc80 | ||
|
|
1ca20427a7 | ||
|
|
f7dfe38777 | ||
|
|
db3165009d | ||
|
|
eea4c10e57 | ||
|
|
b66f2000ec | ||
|
|
5fb237ebbe | ||
|
|
470fb5d4c3 | ||
|
|
34d7afffd9 | ||
|
|
083e73da51 | ||
|
|
63574d6dd7 | ||
|
|
df7777f1dd | ||
|
|
15419f5d6a | ||
|
|
7cfa15526b | ||
|
|
dbc17e3350 | ||
|
|
b0b71a7492 | ||
|
|
698ba6ce3b | ||
|
|
ab039916ca | ||
|
|
184ad73a1d | ||
|
|
0cd732c252 | ||
|
|
a60a161ac8 | ||
|
|
bc6093f4c2 | ||
|
|
61665d8b00 | ||
|
|
c9d69f148c | ||
|
|
e4f0d79eaa | ||
|
|
a44e54d7e9 | ||
|
|
b11b0ce612 | ||
|
|
8976f8e45f | ||
|
|
717cccf841 | ||
|
|
9d7e14d7f5 | ||
|
|
6ac142d507 | ||
|
|
6fb5efd349 | ||
|
|
e0ef4dd95c | ||
|
|
b00bd352c0 | ||
|
|
224131ffc3 | ||
|
|
017a311d93 | ||
|
|
c424208817 | ||
|
|
307d2d8951 | ||
|
|
c2cb27dc85 | ||
|
|
5f30473885 | ||
|
|
0ad7a826d1 | ||
|
|
3e98254fbd | ||
|
|
83090712f9 | ||
|
|
3fbf9587c6 | ||
|
|
027307c052 | ||
|
|
9b2acb1630 | ||
|
|
910117cea9 | ||
|
|
57f66ff374 | ||
|
|
31c6bb617c | ||
|
|
ab91671d73 | ||
|
|
16d082b749 | ||
|
|
36fc87a449 | ||
|
|
323379b216 | ||
|
|
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 | ||
|
|
6d69a98dd1 |
@@ -0,0 +1 @@
|
||||
4.0
|
||||
@@ -0,0 +1,13 @@
|
||||
osx_image: xcode9.2
|
||||
language: objective-c
|
||||
|
||||
xcode_project: DemoExpandingCollection/DemoExpandingCollection.xcodeproj
|
||||
xcode_scheme: ExpandingCollection
|
||||
xcode_sdk: iphonesimulator11.2
|
||||
|
||||
# SWIFT_VERSION: 4.0
|
||||
|
||||
# whitelist
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -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.
|
||||
@@ -10,11 +10,9 @@
|
||||
8422CA731CF73EE4007E8522 /* AnimationBarButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8422CA701CF73EE4007E8522 /* AnimationBarButton.swift */; };
|
||||
8422CA741CF73EE4007E8522 /* Rotatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8422CA721CF73EE4007E8522 /* Rotatable.swift */; };
|
||||
8485962C1CF585F3000BCC74 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8485962B1CF585F3000BCC74 /* AppDelegate.swift */; };
|
||||
8485962E1CF585F3000BCC74 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8485962D1CF585F3000BCC74 /* ViewController.swift */; };
|
||||
848596311CF585F3000BCC74 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8485962F1CF585F3000BCC74 /* Main.storyboard */; };
|
||||
848596331CF585F3000BCC74 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 848596321CF585F3000BCC74 /* Assets.xcassets */; };
|
||||
848596361CF585F3000BCC74 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 848596341CF585F3000BCC74 /* LaunchScreen.storyboard */; };
|
||||
848596411CF585F3000BCC74 /* DemoExpandingCollectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596401CF585F3000BCC74 /* DemoExpandingCollectionTests.swift */; };
|
||||
8485965A1CF586F7000BCC74 /* DemoTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596541CF586F7000BCC74 /* DemoTableViewController.swift */; };
|
||||
8485965B1CF586F7000BCC74 /* DemoCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848596571CF586F7000BCC74 /* DemoCollectionViewCell.swift */; };
|
||||
8485965C1CF586F7000BCC74 /* DemoCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 848596581CF586F7000BCC74 /* DemoCollectionViewCell.xib */; };
|
||||
@@ -32,32 +30,56 @@
|
||||
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 */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
8485963D1CF585F3000BCC74 /* PBXContainerItemProxy */ = {
|
||||
8499D8191D001B82004B5B37 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 848596201CF585F3000BCC74 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 848596271CF585F3000BCC74;
|
||||
remoteInfo = DemoExpandingCollection;
|
||||
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>"; };
|
||||
848596281CF585F3000BCC74 /* DemoExpandingCollection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoExpandingCollection.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8485962B1CF585F3000BCC74 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
8485962D1CF585F3000BCC74 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
848596301CF585F3000BCC74 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
848596321CF585F3000BCC74 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
848596351CF585F3000BCC74 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
848596371CF585F3000BCC74 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8485963C1CF585F3000BCC74 /* DemoExpandingCollectionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoExpandingCollectionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
848596401CF585F3000BCC74 /* DemoExpandingCollectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoExpandingCollectionTests.swift; sourceTree = "<group>"; };
|
||||
848596421CF585F3000BCC74 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
848596541CF586F7000BCC74 /* DemoTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoTableViewController.swift; sourceTree = "<group>"; };
|
||||
848596571CF586F7000BCC74 /* DemoCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoCollectionViewCell.swift; sourceTree = "<group>"; };
|
||||
848596581CF586F7000BCC74 /* DemoCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DemoCollectionViewCell.xib; sourceTree = "<group>"; };
|
||||
@@ -75,6 +97,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 */
|
||||
|
||||
@@ -83,10 +108,11 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8499D81B1D001B82004B5B37 /* ExpandingCollection.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
848596391CF585F3000BCC74 /* Frameworks */ = {
|
||||
8499D8101D001B82004B5B37 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -125,7 +151,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8485962A1CF585F3000BCC74 /* DemoExpandingCollection */,
|
||||
8485963F1CF585F3000BCC74 /* DemoExpandingCollectionTests */,
|
||||
8499D8151D001B82004B5B37 /* ExpandingCollection */,
|
||||
848596291CF585F3000BCC74 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -134,7 +160,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
848596281CF585F3000BCC74 /* DemoExpandingCollection.app */,
|
||||
8485963C1CF585F3000BCC74 /* DemoExpandingCollectionTests.xctest */,
|
||||
8499D8141D001B82004B5B37 /* ExpandingCollection.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -148,7 +174,6 @@
|
||||
8485965E1CF5870B000BCC74 /* Source */,
|
||||
848596521CF586E0000BCC74 /* ViewControllers */,
|
||||
8485962B1CF585F3000BCC74 /* AppDelegate.swift */,
|
||||
8485962D1CF585F3000BCC74 /* ViewController.swift */,
|
||||
8485962F1CF585F3000BCC74 /* Main.storyboard */,
|
||||
848596321CF585F3000BCC74 /* Assets.xcassets */,
|
||||
848596341CF585F3000BCC74 /* LaunchScreen.storyboard */,
|
||||
@@ -157,15 +182,6 @@
|
||||
path = DemoExpandingCollection;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8485963F1CF585F3000BCC74 /* DemoExpandingCollectionTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
848596401CF585F3000BCC74 /* DemoExpandingCollectionTests.swift */,
|
||||
848596421CF585F3000BCC74 /* Info.plist */,
|
||||
);
|
||||
path = DemoExpandingCollectionTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
848596521CF586E0000BCC74 /* ViewControllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -349,6 +365,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 = (
|
||||
@@ -359,6 +384,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;
|
||||
@@ -368,33 +404,35 @@
|
||||
848596241CF585F3000BCC74 /* Sources */,
|
||||
848596251CF585F3000BCC74 /* Frameworks */,
|
||||
848596261CF585F3000BCC74 /* Resources */,
|
||||
8499D8201D001B82004B5B37 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
8499D81A1D001B82004B5B37 /* PBXTargetDependency */,
|
||||
);
|
||||
name = DemoExpandingCollection;
|
||||
productName = DemoExpandingCollection;
|
||||
productReference = 848596281CF585F3000BCC74 /* DemoExpandingCollection.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
8485963B1CF585F3000BCC74 /* DemoExpandingCollectionTests */ = {
|
||||
8499D8131D001B82004B5B37 /* ExpandingCollection */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 848596481CF585F3000BCC74 /* Build configuration list for PBXNativeTarget "DemoExpandingCollectionTests" */;
|
||||
buildConfigurationList = 8499D81F1D001B82004B5B37 /* Build configuration list for PBXNativeTarget "ExpandingCollection" */;
|
||||
buildPhases = (
|
||||
848596381CF585F3000BCC74 /* Sources */,
|
||||
848596391CF585F3000BCC74 /* Frameworks */,
|
||||
8485963A1CF585F3000BCC74 /* Resources */,
|
||||
8499D80F1D001B82004B5B37 /* Sources */,
|
||||
8499D8101D001B82004B5B37 /* Frameworks */,
|
||||
8499D8111D001B82004B5B37 /* Headers */,
|
||||
8499D8121D001B82004B5B37 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
8485963E1CF585F3000BCC74 /* PBXTargetDependency */,
|
||||
);
|
||||
name = DemoExpandingCollectionTests;
|
||||
productName = DemoExpandingCollectionTests;
|
||||
productReference = 8485963C1CF585F3000BCC74 /* DemoExpandingCollectionTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
name = ExpandingCollection;
|
||||
productName = ExpandingCollection;
|
||||
productReference = 8499D8141D001B82004B5B37 /* ExpandingCollection.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
@@ -403,16 +441,18 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0730;
|
||||
LastUpgradeCheck = 0920;
|
||||
ORGANIZATIONNAME = "Alex K.";
|
||||
TargetAttributes = {
|
||||
848596271CF585F3000BCC74 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
DevelopmentTeam = 34MUF9YXTA;
|
||||
LastSwiftMigration = 0920;
|
||||
};
|
||||
8485963B1CF585F3000BCC74 = {
|
||||
8499D8131D001B82004B5B37 = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
TestTargetID = 848596271CF585F3000BCC74;
|
||||
DevelopmentTeam = LEAZS7L33U;
|
||||
LastSwiftMigration = 0920;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -430,7 +470,7 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
848596271CF585F3000BCC74 /* DemoExpandingCollection */,
|
||||
8485963B1CF585F3000BCC74 /* DemoExpandingCollectionTests */,
|
||||
8499D8131D001B82004B5B37 /* ExpandingCollection */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -447,7 +487,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8485963A1CF585F3000BCC74 /* Resources */ = {
|
||||
8499D8121D001B82004B5B37 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -469,7 +509,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if which swiftgen >/dev/null; then\nswiftgen images \"$PROJECT_DIR/DemoExpandingCollection/Assets.xcassets\" --output \"$PROJECT_DIR/DemoExpandingCollection/Constants/Images.swift\"\nelse\necho \"warning: SwiftGen not installed, download it from https://github.com/AliSoftware/SwiftGen\"\nfi";
|
||||
shellScript = "if which swiftgen >/dev/null; then\nswiftgen images \"$PROJECT_DIR/DemoExpandingCollection/Assets.xcassets\" -t swift3 --output \"$PROJECT_DIR/DemoExpandingCollection/Constants/Images.swift\"\nelse\necho \"warning: SwiftGen not installed, download it from https://github.com/AliSoftware/SwiftGen\"\nfi";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -486,7 +526,6 @@
|
||||
8485965B1CF586F7000BCC74 /* DemoCollectionViewCell.swift in Sources */,
|
||||
8485966A1CF58853000BCC74 /* ExpandingTableViewController.swift in Sources */,
|
||||
8485967B1CF5897B000BCC74 /* ScreenShotHelper.swift in Sources */,
|
||||
8485962E1CF585F3000BCC74 /* ViewController.swift in Sources */,
|
||||
848596721CF58954000BCC74 /* CornerAnimatable.swift in Sources */,
|
||||
8422CA741CF73EE4007E8522 /* Rotatable.swift in Sources */,
|
||||
8485965D1CF586F7000BCC74 /* DemoViewController.swift in Sources */,
|
||||
@@ -502,21 +541,31 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
848596381CF585F3000BCC74 /* Sources */ = {
|
||||
8499D80F1D001B82004B5B37 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
848596411CF585F3000BCC74 /* DemoExpandingCollectionTests.swift in Sources */,
|
||||
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 */
|
||||
8485963E1CF585F3000BCC74 /* PBXTargetDependency */ = {
|
||||
8499D81A1D001B82004B5B37 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 848596271CF585F3000BCC74 /* DemoExpandingCollection */;
|
||||
targetProxy = 8485963D1CF585F3000BCC74 /* PBXContainerItemProxy */;
|
||||
target = 8499D8131D001B82004B5B37 /* ExpandingCollection */;
|
||||
targetProxy = 8499D8191D001B82004B5B37 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
@@ -549,13 +598,21 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
@@ -577,7 +634,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -594,13 +651,21 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
@@ -616,9 +681,10 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
@@ -626,54 +692,88 @@
|
||||
848596461CF585F3000BCC74 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 34MUF9YXTA;
|
||||
INFOPLIST_FILE = DemoExpandingCollection/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.DemoExpandingCollection;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev1;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
848596471CF585F3000BCC74 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = 34MUF9YXTA;
|
||||
INFOPLIST_FILE = DemoExpandingCollection/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.DemoExpandingCollection;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev1;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
848596491CF585F3000BCC74 /* Debug */ = {
|
||||
8499D81D1D001B82004B5B37 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = DemoExpandingCollectionTests/Info.plist;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
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 = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.DemoExpandingCollectionTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoExpandingCollection.app/DemoExpandingCollection";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8485964A1CF585F3000BCC74 /* Release */ = {
|
||||
8499D81E1D001B82004B5B37 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = DemoExpandingCollectionTests/Info.plist;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
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 = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.DemoExpandingCollectionTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoExpandingCollection.app/DemoExpandingCollection";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -698,11 +798,11 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
848596481CF585F3000BCC74 /* Build configuration list for PBXNativeTarget "DemoExpandingCollectionTests" */ = {
|
||||
8499D81F1D001B82004B5B37 /* Build configuration list for PBXNativeTarget "ExpandingCollection" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
848596491CF585F3000BCC74 /* Debug */,
|
||||
8485964A1CF585F3000BCC74 /* Release */,
|
||||
8499D81D1D001B82004B5B37 /* Debug */,
|
||||
8499D81E1D001B82004B5B37 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0920"
|
||||
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"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
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>
|
||||
@@ -11,48 +11,29 @@ import UIKit
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
configureNavigationTabBar()
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(application: UIApplication) {
|
||||
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(application: UIApplication) {
|
||||
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(application: UIApplication) {
|
||||
}
|
||||
|
||||
func applicationWillTerminate(application: UIApplication) {
|
||||
}
|
||||
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
configureNavigationTabBar()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
|
||||
private func configureNavigationTabBar() {
|
||||
//transparent background
|
||||
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
|
||||
UINavigationBar.appearance().shadowImage = UIImage()
|
||||
UINavigationBar.appearance().translucent = true
|
||||
|
||||
let shadow = NSShadow()
|
||||
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
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func configureNavigationTabBar() {
|
||||
//transparent background
|
||||
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
|
||||
UINavigationBar.appearance().shadowImage = UIImage()
|
||||
UINavigationBar.appearance().isTranslucent = true
|
||||
|
||||
let shadow = NSShadow()
|
||||
shadow.shadowOffset = CGSize(width: 0, height: 2)
|
||||
shadow.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.1)
|
||||
|
||||
UINavigationBar.appearance().titleTextAttributes = [
|
||||
NSAttributedStringKey.foregroundColor: UIColor.white,
|
||||
NSAttributedStringKey.shadow: shadow,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
@@ -29,6 +39,11 @@
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
@@ -13,15 +19,35 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2018 Ramotion. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fcf-sN-ku0">
|
||||
<rect key="frame" x="16" y="630" width="343" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Expanding Collection" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bCd-3b-lHA">
|
||||
<rect key="frame" x="101.5" y="323" width="173" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="fcf-sN-ku0" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" id="811-hI-Egq"/>
|
||||
<constraint firstItem="bCd-3b-lHA" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="T4x-O3-JqD"/>
|
||||
<constraint firstItem="bCd-3b-lHA" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="VFr-tp-sPw"/>
|
||||
<constraint firstItem="fcf-sN-ku0" firstAttribute="trailing" secondItem="Ze5-6b-2t3" secondAttribute="trailingMargin" id="dS9-pv-ebe"/>
|
||||
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="fcf-sN-ku0" secondAttribute="bottom" constant="20" id="kbD-dX-t3N"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
<point key="canvasLocation" x="52" y="374.66266866566718"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="L1n-Ia-Jrw">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="L1n-Ia-Jrw">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Demo View Controller-->
|
||||
@@ -15,25 +19,25 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="mRg-Mx-OVI"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="CO1-du-RsN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="BackgroundImage" translatesAutoresizingMaskIntoConstraints="NO" id="o88-Ae-QCA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1/15" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Irl-Rb-fcB">
|
||||
<rect key="frame" x="285" y="559" width="31" height="21"/>
|
||||
<rect key="frame" x="172" y="626.5" width="31" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.85882352941176465" green="0.8666666666666667" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" red="0.85882352941176465" green="0.8666666666666667" blue="0.87058823529411766" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="mRg-Mx-OVI" firstAttribute="top" secondItem="Irl-Rb-fcB" secondAttribute="bottom" constant="20" id="2LM-iO-324"/>
|
||||
<constraint firstItem="o88-Ae-QCA" firstAttribute="top" secondItem="CpK-wn-s3i" secondAttribute="bottom" constant="-44" id="MHx-PV-wBs"/>
|
||||
<constraint firstItem="o88-Ae-QCA" firstAttribute="top" secondItem="CO1-du-RsN" secondAttribute="top" id="MHx-PV-wBs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="o88-Ae-QCA" secondAttribute="trailing" id="Xcv-FC-DFw"/>
|
||||
<constraint firstItem="mRg-Mx-OVI" firstAttribute="top" secondItem="o88-Ae-QCA" secondAttribute="bottom" id="aWe-c0-hwO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="o88-Ae-QCA" secondAttribute="bottom" id="aWe-c0-hwO"/>
|
||||
<constraint firstItem="o88-Ae-QCA" firstAttribute="leading" secondItem="CO1-du-RsN" secondAttribute="leading" id="sd9-mZ-FXM"/>
|
||||
<constraint firstItem="Irl-Rb-fcB" firstAttribute="centerX" secondItem="CO1-du-RsN" secondAttribute="centerX" id="yzg-tR-vdV"/>
|
||||
</constraints>
|
||||
@@ -42,24 +46,24 @@
|
||||
<nil key="title"/>
|
||||
<barButtonItem key="leftBarButtonItem" image="searchIcon" id="xuF-jX-6LN"/>
|
||||
<view key="titleView" contentMode="scaleToFill" id="U0J-H7-fvX">
|
||||
<rect key="frame" x="180" y="6" width="240" height="33"/>
|
||||
<rect key="frame" x="67.5" y="5.5" width="240" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Title" translatesAutoresizingMaskIntoConstraints="NO" id="92b-RV-q6w">
|
||||
<rect key="frame" x="95" y="9" width="51" height="16"/>
|
||||
<rect key="frame" x="94.5" y="8.5" width="51" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="51" id="E8y-UB-H4U"/>
|
||||
<constraint firstAttribute="height" constant="16" id="FBz-Jg-2za"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="92b-RV-q6w" firstAttribute="centerX" secondItem="U0J-H7-fvX" secondAttribute="centerX" id="kLZ-Jr-wTP"/>
|
||||
<constraint firstItem="92b-RV-q6w" firstAttribute="centerY" secondItem="U0J-H7-fvX" secondAttribute="centerY" id="qaL-Bm-FyO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<barButtonItem key="rightBarButtonItem" title="Item" id="mbm-hT-lYD" customClass="AnimatingBarButton" customModule="DemoExpandingCollection" customModuleProvider="target">
|
||||
<barButtonItem key="rightBarButtonItem" title="Item" image="locationButton" id="mbm-hT-lYD" customClass="AnimatingBarButton" customModule="DemoExpandingCollection" customModuleProvider="target">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="normalImageName" value="locationButton"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="selectedImageName" value="CloseButton"/>
|
||||
@@ -85,7 +89,7 @@
|
||||
<toolbarItems/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="5hs-Ir-kRn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
@@ -102,21 +106,21 @@
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="DemoTableViewController" automaticallyAdjustsScrollViewInsets="NO" id="7RW-i0-HfN" customClass="DemoTableViewController" customModule="DemoExpandingCollection" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="static" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="2SU-lJ-2AP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<sections>
|
||||
<tableViewSection id="IIl-eL-sK9">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CustomTableViewCell" rowHeight="124" id="SFA-X2-Rbf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="124"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SFA-X2-Rbf" id="RQr-Ti-ps0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="124"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="map" translatesAutoresizingMaskIntoConstraints="NO" id="MOR-g7-Roh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="124"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="stars" translatesAutoresizingMaskIntoConstraints="NO" id="u4E-kh-oBd">
|
||||
<rect key="frame" x="40" y="92" width="77" height="12"/>
|
||||
@@ -126,9 +130,9 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La Crescenta-Montrose, CA91020 Glendale
NO. 7911847" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xh7-la-W1r">
|
||||
<rect key="frame" x="40" y="48" width="552" height="27"/>
|
||||
<rect key="frame" x="40" y="49" width="319" height="26.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="0.49803921568627452" green="0.51764705882352935" blue="0.53725490196078429" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" red="0.49803921568627452" green="0.51764705882352935" blue="0.53725490196078429" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
@@ -145,278 +149,375 @@
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="124" id="ew1-hI-ark">
|
||||
<rect key="frame" x="0.0" y="124" width="600" height="124"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="il3-eE-Dz6">
|
||||
<rect key="frame" x="0.0" y="124" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ew1-hI-ark" id="tMC-aw-BE2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="il3-eE-Dz6" id="MsP-wf-fvb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="9zL-0u-FrF">
|
||||
<rect key="frame" x="40" y="20" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="uVu-gN-MRp">
|
||||
<rect key="frame" x="40" y="15" width="295" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ukw-f4-MVo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="uxT-p4-twy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="MVQ-VZ-6fS"/>
|
||||
<constraint firstAttribute="height" constant="40" id="Sd9-Ve-7wv"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HrH-RB-ew1">
|
||||
<rect key="frame" x="50" y="11" width="168" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lHC-gQ-gcP">
|
||||
<rect key="frame" x="228" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="A79-W0-b7f">
|
||||
<rect key="frame" x="281" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="cWC-7U-c6U">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="Aal-gs-pRU"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="78B-o8-UlD"/>
|
||||
<constraint firstAttribute="height" constant="40" id="b9d-Vi-STe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ukw-f4-MVo" secondAttribute="trailing" id="LFh-OH-GCr"/>
|
||||
<constraint firstItem="ukw-f4-MVo" firstAttribute="leading" secondItem="uVu-gN-MRp" secondAttribute="leading" id="SZN-hq-17r"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="Nk4-8x-Lwg">
|
||||
<rect key="frame" x="524" y="34" width="14" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KVC-Pp-S9H">
|
||||
<rect key="frame" x="108" y="31" width="74" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784313725491" green="0.41960784313725491" blue="0.41960784313725491" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UAK-of-lpJ">
|
||||
<rect key="frame" x="219" y="34" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588235294112" green="0.76470588235294112" blue="0.76470588235294112" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2zo-A7-sbM">
|
||||
<rect key="frame" x="40" y="57" width="498" height="59"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="59" id="zel-Yy-v9k"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.44313725490196076" green="0.44313725490196076" blue="0.44313725490196076" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="2zo-A7-sbM" firstAttribute="leading" secondItem="tMC-aw-BE2" secondAttribute="leading" constant="40" id="H38-Fq-dyr"/>
|
||||
<constraint firstItem="UAK-of-lpJ" firstAttribute="centerY" secondItem="KVC-Pp-S9H" secondAttribute="centerY" id="LsD-yB-O6d"/>
|
||||
<constraint firstItem="UAK-of-lpJ" firstAttribute="leading" secondItem="KVC-Pp-S9H" secondAttribute="trailing" constant="37" id="Q2S-o9-jqX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Nk4-8x-Lwg" secondAttribute="trailing" constant="62" id="V8O-HD-kFA"/>
|
||||
<constraint firstItem="Nk4-8x-Lwg" firstAttribute="centerY" secondItem="9zL-0u-FrF" secondAttribute="centerY" id="W5E-fE-j0w"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2zo-A7-sbM" secondAttribute="trailing" constant="62" id="Z9T-o6-3gf"/>
|
||||
<constraint firstItem="KVC-Pp-S9H" firstAttribute="centerY" secondItem="9zL-0u-FrF" secondAttribute="centerY" id="brv-4K-N8t"/>
|
||||
<constraint firstItem="KVC-Pp-S9H" firstAttribute="leading" secondItem="9zL-0u-FrF" secondAttribute="trailing" constant="28" id="i1I-Wl-eDa"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="2zo-A7-sbM" secondAttribute="bottom" id="i8F-BH-FCe"/>
|
||||
<constraint firstItem="9zL-0u-FrF" firstAttribute="leading" secondItem="tMC-aw-BE2" secondAttribute="leading" constant="40" id="vVg-gG-k8j"/>
|
||||
<constraint firstItem="9zL-0u-FrF" firstAttribute="top" secondItem="tMC-aw-BE2" secondAttribute="top" constant="20" id="w5h-fl-OmZ"/>
|
||||
<constraint firstItem="uVu-gN-MRp" firstAttribute="top" secondItem="MsP-wf-fvb" secondAttribute="top" constant="15" id="NQl-Be-BKZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="uVu-gN-MRp" secondAttribute="bottom" constant="15" id="jvP-x7-pnF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="uVu-gN-MRp" secondAttribute="trailing" constant="40" id="tiY-7g-NSN"/>
|
||||
<constraint firstItem="uVu-gN-MRp" firstAttribute="leading" secondItem="MsP-wf-fvb" secondAttribute="leading" constant="40" id="yEt-zX-E7e"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="124" id="0ee-7A-I2I">
|
||||
<rect key="frame" x="0.0" y="248" width="600" height="124"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="72K-TN-0SK">
|
||||
<rect key="frame" x="0.0" y="254" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0ee-7A-I2I" id="jPx-eH-c2S">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="72K-TN-0SK" id="Md6-Nq-ERc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face1" translatesAutoresizingMaskIntoConstraints="NO" id="T8j-gX-HQZ">
|
||||
<rect key="frame" x="40" y="20" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="STK-Cw-1By">
|
||||
<rect key="frame" x="40" y="15" width="295" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="avn-wq-7Zt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face1" translatesAutoresizingMaskIntoConstraints="NO" id="fq4-to-wKp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="G1F-5B-Qmz"/>
|
||||
<constraint firstAttribute="height" constant="40" id="xIh-K6-n5R"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Amada Iin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8rD-uo-vTf">
|
||||
<rect key="frame" x="50" y="11" width="168" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9wq-EN-tLL">
|
||||
<rect key="frame" x="228" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="CCB-2m-LDr">
|
||||
<rect key="frame" x="281" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="Rj6-os-v8s">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="X0h-Mf-l6D"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="AKq-2T-BRC"/>
|
||||
<constraint firstAttribute="width" constant="40" id="lAw-yT-R7T"/>
|
||||
<constraint firstItem="avn-wq-7Zt" firstAttribute="leading" secondItem="STK-Cw-1By" secondAttribute="leading" id="JQi-MO-nNf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="avn-wq-7Zt" secondAttribute="trailing" id="O7i-6t-BF2"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="szO-5V-CyH">
|
||||
<rect key="frame" x="524" y="34" width="14" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amada Iin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UEu-Ap-Kms">
|
||||
<rect key="frame" x="108" y="31" width="68" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7hI-Qw-bUn">
|
||||
<rect key="frame" x="213" y="34" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rkV-jC-tTs">
|
||||
<rect key="frame" x="40" y="57" width="498" height="59"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="59" id="pYw-qC-eUH"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="UEu-Ap-Kms" firstAttribute="centerY" secondItem="T8j-gX-HQZ" secondAttribute="centerY" id="0ar-MM-JhP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="szO-5V-CyH" secondAttribute="trailing" constant="62" id="I1Z-x4-mXH"/>
|
||||
<constraint firstItem="7hI-Qw-bUn" firstAttribute="leading" secondItem="UEu-Ap-Kms" secondAttribute="trailing" constant="37" id="JWw-Z3-bSW"/>
|
||||
<constraint firstItem="7hI-Qw-bUn" firstAttribute="centerY" secondItem="UEu-Ap-Kms" secondAttribute="centerY" id="KR6-QV-sS2"/>
|
||||
<constraint firstItem="szO-5V-CyH" firstAttribute="centerY" secondItem="T8j-gX-HQZ" secondAttribute="centerY" id="UVU-13-4LE"/>
|
||||
<constraint firstItem="rkV-jC-tTs" firstAttribute="leading" secondItem="jPx-eH-c2S" secondAttribute="leading" constant="40" id="cf4-Ue-Xs2"/>
|
||||
<constraint firstItem="UEu-Ap-Kms" firstAttribute="leading" secondItem="T8j-gX-HQZ" secondAttribute="trailing" constant="28" id="fhv-QP-9Wc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rkV-jC-tTs" secondAttribute="trailing" constant="62" id="kZt-vH-S8D"/>
|
||||
<constraint firstItem="T8j-gX-HQZ" firstAttribute="leading" secondItem="jPx-eH-c2S" secondAttribute="leading" constant="40" id="v3e-He-0Sh"/>
|
||||
<constraint firstItem="T8j-gX-HQZ" firstAttribute="top" secondItem="jPx-eH-c2S" secondAttribute="top" constant="20" id="v85-ak-nGz"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="rkV-jC-tTs" secondAttribute="bottom" id="wJM-Lw-H9T"/>
|
||||
<constraint firstItem="STK-Cw-1By" firstAttribute="top" secondItem="Md6-Nq-ERc" secondAttribute="top" constant="15" id="OiO-xC-QYX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="STK-Cw-1By" secondAttribute="trailing" constant="40" id="T5c-DM-4CG"/>
|
||||
<constraint firstItem="STK-Cw-1By" firstAttribute="leading" secondItem="Md6-Nq-ERc" secondAttribute="leading" constant="40" id="bFM-Xr-TcA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="STK-Cw-1By" secondAttribute="bottom" constant="15" id="xiT-eh-j7e"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="124" id="fTH-KP-Ac5">
|
||||
<rect key="frame" x="0.0" y="372" width="600" height="124"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="Tdr-Sn-B0H">
|
||||
<rect key="frame" x="0.0" y="384" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fTH-KP-Ac5" id="BGd-Mp-TnE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Tdr-Sn-B0H" id="GLn-XG-K05">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="l6O-iU-Deh">
|
||||
<rect key="frame" x="40" y="20" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="DDu-ZJ-lER">
|
||||
<rect key="frame" x="40" y="15" width="295" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="27f-K8-QUC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="4yu-jC-UXz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="heF-QW-z6Q"/>
|
||||
<constraint firstAttribute="width" constant="40" id="tiZ-lo-ugS"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nsm-QZ-YcV">
|
||||
<rect key="frame" x="50" y="11" width="168" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d6Y-da-Srh">
|
||||
<rect key="frame" x="228" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="LNB-9D-Kgq">
|
||||
<rect key="frame" x="281" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="guA-2J-wB7">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="eVB-K1-R8b"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Wvu-NC-dmu"/>
|
||||
<constraint firstAttribute="width" constant="40" id="goR-UO-N7g"/>
|
||||
<constraint firstAttribute="trailing" secondItem="27f-K8-QUC" secondAttribute="trailing" id="CJy-xz-6Zt"/>
|
||||
<constraint firstItem="27f-K8-QUC" firstAttribute="leading" secondItem="DDu-ZJ-lER" secondAttribute="leading" id="JyM-0i-VoB"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="ceS-Mg-PrP">
|
||||
<rect key="frame" x="524" y="34" width="14" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a3U-of-sdv">
|
||||
<rect key="frame" x="108" y="31" width="74" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h3x-N2-MWJ">
|
||||
<rect key="frame" x="219" y="34" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3ZN-4l-hGa">
|
||||
<rect key="frame" x="40" y="57" width="498" height="59"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="59" id="z9M-6w-uYi"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="h3x-N2-MWJ" firstAttribute="centerY" secondItem="a3U-of-sdv" secondAttribute="centerY" id="879-Lf-sHE"/>
|
||||
<constraint firstItem="l6O-iU-Deh" firstAttribute="top" secondItem="BGd-Mp-TnE" secondAttribute="top" constant="20" id="C4W-pg-781"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="3ZN-4l-hGa" secondAttribute="bottom" id="KIV-vm-vEj"/>
|
||||
<constraint firstItem="a3U-of-sdv" firstAttribute="centerY" secondItem="l6O-iU-Deh" secondAttribute="centerY" id="N7q-ub-LKa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ceS-Mg-PrP" secondAttribute="trailing" constant="62" id="Sfq-JU-4Nm"/>
|
||||
<constraint firstItem="l6O-iU-Deh" firstAttribute="leading" secondItem="BGd-Mp-TnE" secondAttribute="leading" constant="40" id="VMR-N1-Xjl"/>
|
||||
<constraint firstItem="ceS-Mg-PrP" firstAttribute="centerY" secondItem="l6O-iU-Deh" secondAttribute="centerY" id="fdg-23-M6H"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3ZN-4l-hGa" secondAttribute="trailing" constant="62" id="hmQ-iS-d5t"/>
|
||||
<constraint firstItem="a3U-of-sdv" firstAttribute="leading" secondItem="l6O-iU-Deh" secondAttribute="trailing" constant="28" id="o1q-GY-Lns"/>
|
||||
<constraint firstItem="3ZN-4l-hGa" firstAttribute="leading" secondItem="BGd-Mp-TnE" secondAttribute="leading" constant="40" id="oCn-vE-6YT"/>
|
||||
<constraint firstItem="h3x-N2-MWJ" firstAttribute="leading" secondItem="a3U-of-sdv" secondAttribute="trailing" constant="37" id="wku-gF-N0I"/>
|
||||
<constraint firstItem="DDu-ZJ-lER" firstAttribute="top" secondItem="GLn-XG-K05" secondAttribute="top" constant="15" id="l1S-IL-jMj"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DDu-ZJ-lER" secondAttribute="bottom" constant="15" id="mWj-0T-I4l"/>
|
||||
<constraint firstItem="DDu-ZJ-lER" firstAttribute="leading" secondItem="GLn-XG-K05" secondAttribute="leading" constant="40" id="pvZ-k7-1w4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DDu-ZJ-lER" secondAttribute="trailing" constant="40" id="wdR-TG-u4d"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="124" id="irZ-0L-X9r">
|
||||
<rect key="frame" x="0.0" y="496" width="600" height="124"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="DKC-ay-0W5">
|
||||
<rect key="frame" x="0.0" y="514" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="irZ-0L-X9r" id="t3x-Eb-ktg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="DKC-ay-0W5" id="OvL-k3-UIL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face1" translatesAutoresizingMaskIntoConstraints="NO" id="SY0-ki-F5U">
|
||||
<rect key="frame" x="40" y="20" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="STI-xc-qal">
|
||||
<rect key="frame" x="40" y="15" width="295" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="YWJ-Pq-HUf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face1" translatesAutoresizingMaskIntoConstraints="NO" id="Uz6-PY-MeW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="avr-xK-V22"/>
|
||||
<constraint firstAttribute="width" constant="40" id="dgi-bt-ecS"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Amada Iin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7OF-et-epa">
|
||||
<rect key="frame" x="50" y="11" width="168" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xP4-cS-081">
|
||||
<rect key="frame" x="228" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="C86-X3-gRu">
|
||||
<rect key="frame" x="281" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="v80-2F-1zn">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="nvf-wL-GDB"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="1XW-AC-9LK"/>
|
||||
<constraint firstAttribute="height" constant="40" id="jDR-B8-a7U"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YWJ-Pq-HUf" secondAttribute="trailing" id="5ym-ch-XVe"/>
|
||||
<constraint firstItem="YWJ-Pq-HUf" firstAttribute="leading" secondItem="STI-xc-qal" secondAttribute="leading" id="mJk-x2-SxR"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="g7r-dJ-em9">
|
||||
<rect key="frame" x="524" y="34" width="14" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amada Iin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0sx-fO-Xiy">
|
||||
<rect key="frame" x="108" y="31" width="68" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SVA-lD-IQs">
|
||||
<rect key="frame" x="213" y="34" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kYn-LQ-ReD">
|
||||
<rect key="frame" x="40" y="57" width="498" height="59"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="59" id="sMt-dP-LYh"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="SVA-lD-IQs" firstAttribute="centerY" secondItem="0sx-fO-Xiy" secondAttribute="centerY" id="2jW-fL-D7T"/>
|
||||
<constraint firstAttribute="trailing" secondItem="g7r-dJ-em9" secondAttribute="trailing" constant="62" id="ChQ-bB-Cik"/>
|
||||
<constraint firstItem="0sx-fO-Xiy" firstAttribute="centerY" secondItem="SY0-ki-F5U" secondAttribute="centerY" id="Faj-Bw-0Tu"/>
|
||||
<constraint firstItem="kYn-LQ-ReD" firstAttribute="leading" secondItem="t3x-Eb-ktg" secondAttribute="leading" constant="40" id="HLb-38-S1u"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kYn-LQ-ReD" secondAttribute="trailing" constant="62" id="HzA-Nb-vXy"/>
|
||||
<constraint firstItem="g7r-dJ-em9" firstAttribute="centerY" secondItem="SY0-ki-F5U" secondAttribute="centerY" id="KEY-Pc-yZs"/>
|
||||
<constraint firstItem="SY0-ki-F5U" firstAttribute="leading" secondItem="t3x-Eb-ktg" secondAttribute="leading" constant="40" id="NZg-9p-Sb1"/>
|
||||
<constraint firstItem="0sx-fO-Xiy" firstAttribute="leading" secondItem="SY0-ki-F5U" secondAttribute="trailing" constant="28" id="Xe5-9G-9vl"/>
|
||||
<constraint firstItem="SY0-ki-F5U" firstAttribute="top" secondItem="t3x-Eb-ktg" secondAttribute="top" constant="20" id="YyV-BS-5UD"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="kYn-LQ-ReD" secondAttribute="bottom" id="oHX-7c-bG2"/>
|
||||
<constraint firstItem="SVA-lD-IQs" firstAttribute="leading" secondItem="0sx-fO-Xiy" secondAttribute="trailing" constant="37" id="xkH-1T-7dm"/>
|
||||
<constraint firstItem="STI-xc-qal" firstAttribute="top" secondItem="OvL-k3-UIL" secondAttribute="top" constant="15" id="1Wt-eA-mfs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="STI-xc-qal" secondAttribute="bottom" constant="15" id="Gcc-F3-tlL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="STI-xc-qal" secondAttribute="trailing" constant="40" id="leW-dt-mEv"/>
|
||||
<constraint firstItem="STI-xc-qal" firstAttribute="leading" secondItem="OvL-k3-UIL" secondAttribute="leading" constant="40" id="mhF-9Y-V2L"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="124" id="Fj4-n4-S6M">
|
||||
<rect key="frame" x="0.0" y="620" width="600" height="124"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="Bem-uK-CGC">
|
||||
<rect key="frame" x="0.0" y="644" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Fj4-n4-S6M" id="D8J-AG-YUN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="124"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Bem-uK-CGC" id="wC3-Hh-anO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="dRk-IE-zXs">
|
||||
<rect key="frame" x="40" y="20" width="40" height="40"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="tMM-s3-OKo">
|
||||
<rect key="frame" x="40" y="15" width="295" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="TFL-At-uyI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face2" translatesAutoresizingMaskIntoConstraints="NO" id="QOG-Ub-YqG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="7lU-qa-EHL"/>
|
||||
<constraint firstAttribute="width" constant="40" id="XYT-JZ-AY1"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ReU-Mu-iaN">
|
||||
<rect key="frame" x="50" y="11" width="168" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zzn-X1-aOV">
|
||||
<rect key="frame" x="228" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="PsA-nw-Zed">
|
||||
<rect key="frame" x="281" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="qtA-cn-iTh">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="d7O-23-tUP"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="KNl-fy-6Ga"/>
|
||||
<constraint firstAttribute="width" constant="40" id="hN8-5E-akX"/>
|
||||
<constraint firstItem="TFL-At-uyI" firstAttribute="leading" secondItem="tMM-s3-OKo" secondAttribute="leading" id="5AL-z3-8xe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TFL-At-uyI" secondAttribute="trailing" id="Wab-Pf-VgL"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="hz8-Cp-lQj">
|
||||
<rect key="frame" x="524" y="34" width="14" height="13"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Peter Allan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YjL-xf-PcV">
|
||||
<rect key="frame" x="108" y="31" width="74" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J4t-pX-zbM">
|
||||
<rect key="frame" x="219" y="34" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q6w-vY-gMp">
|
||||
<rect key="frame" x="40" y="57" width="498" height="59"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="59" id="T4M-G7-7hc"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Q6w-vY-gMp" firstAttribute="leading" secondItem="D8J-AG-YUN" secondAttribute="leading" constant="40" id="1ka-fN-GDR"/>
|
||||
<constraint firstItem="dRk-IE-zXs" firstAttribute="leading" secondItem="D8J-AG-YUN" secondAttribute="leading" constant="40" id="7Oe-Rd-NXO"/>
|
||||
<constraint firstItem="hz8-Cp-lQj" firstAttribute="centerY" secondItem="dRk-IE-zXs" secondAttribute="centerY" id="C2R-V0-FlH"/>
|
||||
<constraint firstItem="J4t-pX-zbM" firstAttribute="leading" secondItem="YjL-xf-PcV" secondAttribute="trailing" constant="37" id="DG5-6g-aw8"/>
|
||||
<constraint firstItem="dRk-IE-zXs" firstAttribute="top" secondItem="D8J-AG-YUN" secondAttribute="top" constant="20" id="FvH-zN-qew"/>
|
||||
<constraint firstItem="J4t-pX-zbM" firstAttribute="centerY" secondItem="YjL-xf-PcV" secondAttribute="centerY" id="JiC-Tf-VdR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hz8-Cp-lQj" secondAttribute="trailing" constant="62" id="LWy-zf-18F"/>
|
||||
<constraint firstItem="YjL-xf-PcV" firstAttribute="leading" secondItem="dRk-IE-zXs" secondAttribute="trailing" constant="28" id="PDn-rh-K7o"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Q6w-vY-gMp" secondAttribute="trailing" constant="62" id="X6j-C7-AtW"/>
|
||||
<constraint firstItem="YjL-xf-PcV" firstAttribute="centerY" secondItem="dRk-IE-zXs" secondAttribute="centerY" id="jkE-J3-oHA"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="Q6w-vY-gMp" secondAttribute="bottom" id="nTe-QJ-NrE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tMM-s3-OKo" secondAttribute="trailing" constant="40" id="0OQ-7D-Xjo"/>
|
||||
<constraint firstItem="tMM-s3-OKo" firstAttribute="top" secondItem="wC3-Hh-anO" secondAttribute="top" constant="15" id="Aqq-GD-5qX"/>
|
||||
<constraint firstItem="tMM-s3-OKo" firstAttribute="leading" secondItem="wC3-Hh-anO" secondAttribute="leading" constant="40" id="Lz1-G1-EfS"/>
|
||||
<constraint firstAttribute="bottom" secondItem="tMM-s3-OKo" secondAttribute="bottom" constant="15" id="g3Y-GA-ZAk"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="130" id="3rA-ws-KnH">
|
||||
<rect key="frame" x="0.0" y="774" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3rA-ws-KnH" id="vNS-El-lEA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="dHy-no-3dG">
|
||||
<rect key="frame" x="0.0" y="15" width="0.0" height="100"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="qg6-9G-buN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="0.0" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="face1" translatesAutoresizingMaskIntoConstraints="NO" id="d7e-fT-v2a">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="6Ky-QD-1rh"/>
|
||||
<constraint firstAttribute="width" constant="40" id="R3O-gp-WGo"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Amada Iin" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dsG-zh-ZDw">
|
||||
<rect key="frame" x="0.0" y="11" width="0.0" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.41960784309999999" green="0.41960784309999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FEB 14th" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="37E-Ih-nze">
|
||||
<rect key="frame" x="0.0" y="14" width="43" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.76470588240000004" green="0.76470588240000004" blue="0.76470588240000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="heand" translatesAutoresizingMaskIntoConstraints="NO" id="I3D-43-QUr">
|
||||
<rect key="frame" x="0.0" y="13.5" width="14" height="13"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.80000000000000004" translatesAutoresizingMaskIntoConstraints="NO" id="uhH-HH-oP4">
|
||||
<rect key="frame" x="0.0" y="40" width="0.0" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="kTR-Ho-zi0"/>
|
||||
</constraints>
|
||||
<string key="text">The federal beach atc requires states that receive funding to develop a risk-based beach evaluation and classification plan and apply it to</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.4431372549" green="0.4431372549" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="qg6-9G-buN" secondAttribute="trailing" id="Pjy-os-XZx"/>
|
||||
<constraint firstItem="qg6-9G-buN" firstAttribute="leading" secondItem="dHy-no-3dG" secondAttribute="leading" id="lZi-8T-Hep"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="dHy-no-3dG" firstAttribute="leading" secondItem="vNS-El-lEA" secondAttribute="leading" constant="40" id="1Pl-pq-EEl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dHy-no-3dG" secondAttribute="trailing" constant="40" id="K29-x8-3Dt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dHy-no-3dG" secondAttribute="bottom" constant="15" id="nC7-OP-5iZ"/>
|
||||
<constraint firstItem="dHy-no-3dG" firstAttribute="top" secondItem="vNS-El-lEA" secondAttribute="top" constant="15" id="w4v-Gg-Zqa"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
@@ -428,22 +529,23 @@
|
||||
<outlet property="delegate" destination="7RW-i0-HfN" id="28D-Ct-5A9"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" id="9zG-W9-jGP">
|
||||
<nil key="title"/>
|
||||
<barButtonItem key="leftBarButtonItem" image="searchIcon" id="sSw-AG-wrF"/>
|
||||
<view key="titleView" contentMode="scaleToFill" id="qyb-Fh-aIr" userLabel="Item View">
|
||||
<rect key="frame" x="180" y="6" width="240" height="33"/>
|
||||
<rect key="frame" x="67.5" y="5.5" width="240" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Title" translatesAutoresizingMaskIntoConstraints="NO" id="a24-t2-9jd">
|
||||
<rect key="frame" x="95" y="9" width="51" height="16"/>
|
||||
<rect key="frame" x="94.5" y="8.5" width="51" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="5Zr-Wx-iQB"/>
|
||||
<constraint firstAttribute="width" constant="51" id="RtX-4m-x9W"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="a24-t2-9jd" firstAttribute="centerX" secondItem="qyb-Fh-aIr" secondAttribute="centerX" id="sdW-OO-2BS"/>
|
||||
<constraint firstItem="a24-t2-9jd" firstAttribute="centerY" secondItem="qyb-Fh-aIr" secondAttribute="centerY" id="xKF-DL-knz"/>
|
||||
@@ -455,6 +557,7 @@
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="koT-TQ-RUs" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
@@ -468,8 +571,10 @@
|
||||
<image name="face1" width="40" height="39"/>
|
||||
<image name="face2" width="40" height="39"/>
|
||||
<image name="heand" width="14" height="13"/>
|
||||
<image name="locationButton" width="20" height="20"/>
|
||||
<image name="map" width="375" height="124"/>
|
||||
<image name="searchIcon" width="20" height="20"/>
|
||||
<image name="stars" width="77" height="11"/>
|
||||
</resources>
|
||||
<color key="tintColor" red="0.97429201227993889" green="0.97273087832317329" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</document>
|
||||
|
||||
@@ -1,35 +1,60 @@
|
||||
// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
#if os(iOS) || os(tvOS) || os(watchOS)
|
||||
import UIKit.UIImage
|
||||
typealias Image = UIImage
|
||||
#elseif os(OSX)
|
||||
import AppKit.NSImage
|
||||
typealias Image = NSImage
|
||||
#endif
|
||||
|
||||
extension UIImage {
|
||||
enum Asset: String {
|
||||
case BackgroundImage = "BackgroundImage"
|
||||
case CloseButton = "CloseButton"
|
||||
case Dots = "dots"
|
||||
case Face1 = "face1"
|
||||
case Face2 = "face2"
|
||||
case Heand = "heand"
|
||||
case Icons = "icons"
|
||||
case Image = "image"
|
||||
case Item0 = "item0"
|
||||
case Item1 = "item1"
|
||||
case Item2 = "item2"
|
||||
case Item3 = "item3"
|
||||
case LocationButton = "locationButton"
|
||||
case Map = "map"
|
||||
case PinIcon = "pinIcon"
|
||||
case SearchIcon = "searchIcon"
|
||||
case Stars = "stars"
|
||||
case Title = "Title"
|
||||
// swiftlint:disable file_length
|
||||
// swiftlint:disable line_length
|
||||
|
||||
var image: UIImage {
|
||||
return UIImage(asset: self)
|
||||
// swiftlint:disable type_body_length
|
||||
enum Asset: String {
|
||||
case backgroundImage = "BackgroundImage"
|
||||
case closeButton = "CloseButton"
|
||||
case dots
|
||||
case face1
|
||||
case face2
|
||||
case heand
|
||||
case icons
|
||||
case image
|
||||
case item0
|
||||
case item1
|
||||
case item2
|
||||
case item3
|
||||
case locationButton
|
||||
case map
|
||||
case pinIcon
|
||||
case searchIcon
|
||||
case stars
|
||||
case title = "Title"
|
||||
|
||||
var image: Image {
|
||||
let bundle = Bundle(for: BundleToken.self)
|
||||
#if os(iOS) || os(tvOS) || os(watchOS)
|
||||
let image = Image(named: rawValue, in: bundle, compatibleWith: nil)
|
||||
#elseif os(OSX)
|
||||
let image = bundle.image(forResource: rawValue)
|
||||
#endif
|
||||
guard let result = image else { fatalError("Unable to load image \(rawValue).") }
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
convenience init!(asset: Asset) {
|
||||
self.init(named: asset.rawValue)
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:enable type_body_length
|
||||
|
||||
extension Image {
|
||||
convenience init!(asset: Asset) {
|
||||
#if os(iOS) || os(tvOS) || os(watchOS)
|
||||
let bundle = Bundle(for: BundleToken.self)
|
||||
self.init(named: asset.rawValue, in: bundle, compatibleWith: nil)
|
||||
#elseif os(OSX)
|
||||
self.init(named: asset.rawValue)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private final class BundleToken {}
|
||||
|
||||
@@ -9,25 +9,26 @@
|
||||
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 {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.cellIdentifier) ")
|
||||
|
||||
func getReusableCellWithIdentifier<T: UICollectionViewCell>(_ indexPath: IndexPath) -> T {
|
||||
guard let cell = dequeueReusableCell(withReuseIdentifier: T.cellIdentifier, for: indexPath) as? T else {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.cellIdentifier) ")
|
||||
}
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UITableViewCell
|
||||
|
||||
protocol CollectionViewCellIdentifiable {
|
||||
static var cellIdentifier: String { get }
|
||||
static var cellIdentifier: String { get }
|
||||
}
|
||||
|
||||
extension CollectionViewCellIdentifiable where Self: UICollectionViewCell {
|
||||
static var cellIdentifier: String {
|
||||
return String(self)
|
||||
}
|
||||
static var cellIdentifier: String {
|
||||
return String(describing: self)
|
||||
}
|
||||
}
|
||||
|
||||
extension UICollectionViewCell : CollectionViewCellIdentifiable { }
|
||||
extension UICollectionViewCell: CollectionViewCellIdentifiable {}
|
||||
|
||||
@@ -9,38 +9,38 @@
|
||||
import UIKit
|
||||
|
||||
extension UIStoryboard {
|
||||
|
||||
enum Storyboard : String {
|
||||
case Main
|
||||
}
|
||||
|
||||
convenience init(storyboard: Storyboard, bundle: NSBundle? = nil) {
|
||||
self.init(name: storyboard.rawValue, bundle: bundle)
|
||||
}
|
||||
|
||||
class func storyboard(storyboard: Storyboard, bundle: NSBundle? = nil) -> UIStoryboard {
|
||||
return UIStoryboard(name: storyboard.rawValue, bundle: bundle)
|
||||
}
|
||||
|
||||
func instantiateViewController<T: UIViewController where T: StoryboardIdentifiable>() -> T {
|
||||
guard let viewController = self.instantiateViewControllerWithIdentifier(T.storyboardIdentifier) as? T else {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.storyboardIdentifier) ")
|
||||
|
||||
enum Storyboard: String {
|
||||
case Main
|
||||
}
|
||||
|
||||
convenience init(storyboard: Storyboard, bundle: Bundle? = nil) {
|
||||
self.init(name: storyboard.rawValue, bundle: bundle)
|
||||
}
|
||||
|
||||
class func storyboard(_ storyboard: Storyboard, bundle: Bundle? = nil) -> UIStoryboard {
|
||||
return UIStoryboard(name: storyboard.rawValue, bundle: bundle)
|
||||
}
|
||||
|
||||
func instantiateViewController<T: UIViewController>() -> T {
|
||||
guard let viewController = self.instantiateViewController(withIdentifier: T.storyboardIdentifier) as? T else {
|
||||
fatalError("Couldn't instantiate view controller with identifier \(T.storyboardIdentifier) ")
|
||||
}
|
||||
|
||||
return viewController
|
||||
}
|
||||
|
||||
return viewController
|
||||
}
|
||||
}
|
||||
|
||||
extension UIViewController : StoryboardIdentifiable { }
|
||||
extension UIViewController: StoryboardIdentifiable {}
|
||||
|
||||
// MARK: identifiable
|
||||
|
||||
protocol StoryboardIdentifiable {
|
||||
static var storyboardIdentifier: String { get }
|
||||
static var storyboardIdentifier: String { get }
|
||||
}
|
||||
|
||||
extension StoryboardIdentifiable where Self: UIViewController {
|
||||
static var storyboardIdentifier: String {
|
||||
return String(self)
|
||||
}
|
||||
static var storyboardIdentifier: String {
|
||||
return String(describing: self)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// DemoExpandingCollection
|
||||
//
|
||||
// Created by Alex K. on 25/05/16.
|
||||
// Copyright © 2016 Alex K. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,54 +9,60 @@
|
||||
import UIKit
|
||||
|
||||
class DemoTableViewController: ExpandingTableViewController {
|
||||
|
||||
private var scrollOffsetY: CGFloat = 0
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
configureNavBar()
|
||||
tableView.backgroundView = UIImageView(image: UIImage.Asset.BackgroundImage.image)
|
||||
}
|
||||
|
||||
fileprivate var scrollOffsetY: CGFloat = 0
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
configureNavBar()
|
||||
let image1 = Asset.backgroundImage.image
|
||||
tableView.backgroundView = UIImageView(image: image1)
|
||||
if #available(iOS 11.0, *) {
|
||||
tableView.contentInsetAdjustmentBehavior = .never
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
|
||||
extension DemoTableViewController {
|
||||
|
||||
private func configureNavBar() {
|
||||
navigationItem.leftBarButtonItem?.image = navigationItem.leftBarButtonItem?.image!.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
|
||||
navigationItem.rightBarButtonItem?.image = navigationItem.rightBarButtonItem?.image!.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
|
||||
}
|
||||
|
||||
fileprivate func configureNavBar() {
|
||||
navigationItem.leftBarButtonItem?.image = navigationItem.leftBarButtonItem?.image!.withRenderingMode(UIImageRenderingMode.alwaysOriginal)
|
||||
navigationItem.rightBarButtonItem?.image = navigationItem.rightBarButtonItem?.image!.withRenderingMode(UIImageRenderingMode.alwaysOriginal)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
||||
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 {
|
||||
rightButton.animationSelected(false)
|
||||
}
|
||||
|
||||
@IBAction func backButtonHandler(_: AnyObject) {
|
||||
// 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()
|
||||
}
|
||||
popTransitionAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIScrollViewDelegate
|
||||
|
||||
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)
|
||||
|
||||
override func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
if scrollView.contentOffset.y < -25 , let navigationController = navigationController {
|
||||
// buttonAnimation
|
||||
for case let viewController as DemoViewController in navigationController.viewControllers {
|
||||
if case let rightButton as AnimatingBarButton = viewController.navigationItem.rightBarButtonItem {
|
||||
rightButton.animationSelected(false)
|
||||
}
|
||||
}
|
||||
popTransitionAnimation()
|
||||
}
|
||||
}
|
||||
popTransitionAnimation()
|
||||
scrollOffsetY = scrollView.contentOffset.y
|
||||
}
|
||||
|
||||
scrollOffsetY = scrollView.contentOffset.y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,16 +9,15 @@
|
||||
import UIKit
|
||||
|
||||
class DemoCollectionViewCell: BasePageCollectionCell {
|
||||
|
||||
@IBOutlet weak var backgroundImageView: UIImageView!
|
||||
@IBOutlet weak var customTitle: UILabel!
|
||||
|
||||
|
||||
@IBOutlet var backgroundImageView: UIImageView!
|
||||
@IBOutlet var customTitle: UILabel!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
customTitle.layer.shadowRadius = 2
|
||||
customTitle.layer.shadowOffset = CGSize(width: 0, height: 3)
|
||||
customTitle.layer.shadowOpacity = 0.2
|
||||
|
||||
|
||||
customTitle.layer.shadowRadius = 2
|
||||
customTitle.layer.shadowOffset = CGSize(width: 0, height: 3)
|
||||
customTitle.layer.shadowOpacity = 0.2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -12,45 +13,40 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="256" height="335"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rbd-6U-uYZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="256" height="335"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icons" translatesAutoresizingMaskIntoConstraints="NO" id="7zK-Le-Npw">
|
||||
<rect key="frame" x="20" y="287" width="116" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="116" id="7hq-gd-WaT"/>
|
||||
<constraint firstAttribute="height" constant="40" id="cUH-6u-zMD"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dots" translatesAutoresizingMaskIntoConstraints="NO" id="Au6-h8-xBa">
|
||||
<rect key="frame" x="228" y="298" width="4" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="19" id="KJW-6L-1Ol"/>
|
||||
<constraint firstAttribute="width" constant="4" id="YcW-cL-JpF"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="stars" translatesAutoresizingMaskIntoConstraints="NO" id="l9V-6B-rdj">
|
||||
<rect key="frame" x="159" y="266" width="77" height="12"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="Nl5-u6-NGX"/>
|
||||
<constraint firstAttribute="width" constant="77" id="NwE-fo-yyB"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NO. 7911847" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pMH-Qa-ClW">
|
||||
<rect key="frame" x="24" y="265" width="68" height="14"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="0.49803921568627452" green="0.51764705882352935" blue="0.53725490196078429" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" red="0.49803921568627452" green="0.51764705882352935" blue="0.53725490196078429" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="La Crescenta-Montrose, CA91020" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eC4-wU-lTH">
|
||||
<rect key="frame" x="39" y="240" width="179" height="14"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" red="0.49803921569999998" green="0.51764705879999995" blue="0.53725490200000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" red="0.49803921569999998" green="0.51764705879999995" blue="0.53725490200000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Au6-h8-xBa" firstAttribute="top" secondItem="l9V-6B-rdj" secondAttribute="bottom" constant="20" id="1qd-Em-ZT9"/>
|
||||
<constraint firstItem="pMH-Qa-ClW" firstAttribute="leading" secondItem="rbd-6U-uYZ" secondAttribute="leading" constant="24" id="7zn-VD-NCK"/>
|
||||
@@ -67,33 +63,27 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4h2-Xv-xjU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="256" height="335"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="image" translatesAutoresizingMaskIntoConstraints="NO" id="9FK-FA-F0l">
|
||||
<rect key="frame" x="0.0" y="0.0" width="256" height="335"/>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="item0" translatesAutoresizingMaskIntoConstraints="NO" id="9FK-FA-F0l"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ATCOASTAL" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XFh-D7-eSl">
|
||||
<rect key="frame" x="62" y="10" width="132" height="29"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<bool key="isElement" value="NO"/>
|
||||
</accessibility>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<color key="shadowColor" red="0.0" green="0.0" blue="0.0" alpha="0.076029349662162168" colorSpace="calibratedRGB"/>
|
||||
<color key="shadowColor" red="0.0" green="0.0" blue="0.0" alpha="0.076029349662162168" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<size key="shadowOffset" width="0.0" height="0.0"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oce-vs-fcR" userLabel="LeftView">
|
||||
<rect key="frame" x="8" y="293" width="110" height="32"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NORTH LAT 36" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZG8-y8-Dfi">
|
||||
<rect key="frame" x="13" y="9" width="85" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="0.2070791421" blue="0.80130883779999995" alpha="0.0" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="1" green="0.2070791421" blue="0.80130883779999995" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="ZG8-y8-Dfi" firstAttribute="centerX" secondItem="oce-vs-fcR" secondAttribute="centerX" id="5kH-aW-2nu"/>
|
||||
<constraint firstAttribute="height" constant="32" id="Ltd-P2-jig"/>
|
||||
@@ -101,10 +91,8 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FVj-GH-Mhw" userLabel="CenterView">
|
||||
<rect key="frame" x="119" y="293" width="20" height="32"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pinIcon" translatesAutoresizingMaskIntoConstraints="NO" id="LFF-iv-Z1U">
|
||||
<rect key="frame" x="2" y="7" width="15" height="18"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" staticText="YES"/>
|
||||
<bool key="isElement" value="YES"/>
|
||||
@@ -115,7 +103,7 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" staticText="YES"/>
|
||||
<bool key="isElement" value="NO"/>
|
||||
@@ -128,16 +116,14 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EKg-XH-vNU" userLabel="RightView">
|
||||
<rect key="frame" x="140" y="293" width="110" height="32"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="EAST LNG 97" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zmS-RM-seQ">
|
||||
<rect key="frame" x="18" y="9" width="75" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="0.20707914213106515" blue="0.8013088377544425" alpha="0.0" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="1" green="0.20707914213106515" blue="0.8013088377544425" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zmS-RM-seQ" firstAttribute="centerY" secondItem="EKg-XH-vNU" secondAttribute="centerY" id="dxV-Q6-AU9"/>
|
||||
<constraint firstItem="zmS-RM-seQ" firstAttribute="centerX" secondItem="EKg-XH-vNU" secondAttribute="centerX" id="ls8-YV-n1Q"/>
|
||||
@@ -145,7 +131,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="9FK-FA-F0l" firstAttribute="top" secondItem="4h2-Xv-xjU" secondAttribute="top" id="0HR-8P-WVW"/>
|
||||
<constraint firstItem="EKg-XH-vNU" firstAttribute="leading" secondItem="FVj-GH-Mhw" secondAttribute="trailing" constant="1" id="6Bb-cJ-uQs"/>
|
||||
@@ -166,9 +152,8 @@
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="4h2-Xv-xjU" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="0xA-8H-CCG"/>
|
||||
<constraint firstItem="rbd-6U-uYZ" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="6nN-mZ-xkq"/>
|
||||
@@ -178,7 +163,7 @@
|
||||
<size key="customSize" width="275" height="575"/>
|
||||
<connections>
|
||||
<outlet property="backConstraintY" destination="dmf-qy-2nS" id="szE-V2-yce"/>
|
||||
<outlet property="backContainerView" destination="rbd-6U-uYZ" id="bk5-30-huH"/>
|
||||
<outlet property="backContainerView" destination="rbd-6U-uYZ" id="fl2-yE-o3C"/>
|
||||
<outlet property="backgroundImageView" destination="9FK-FA-F0l" id="kns-UF-jMo"/>
|
||||
<outlet property="customTitle" destination="XFh-D7-eSl" id="eia-lY-ptu"/>
|
||||
<outlet property="frontConstraintY" destination="0xA-8H-CCG" id="qOL-jY-lrP"/>
|
||||
@@ -190,7 +175,7 @@
|
||||
<resources>
|
||||
<image name="dots" width="4" height="19"/>
|
||||
<image name="icons" width="116" height="39"/>
|
||||
<image name="image" width="375" height="382"/>
|
||||
<image name="item0" width="414" height="736"/>
|
||||
<image name="pinIcon" width="26" height="32"/>
|
||||
<image name="stars" width="77" height="11"/>
|
||||
</resources>
|
||||
|
||||
@@ -9,143 +9,136 @@
|
||||
import UIKit
|
||||
|
||||
class DemoViewController: ExpandingViewController {
|
||||
|
||||
typealias ItemInfo = (imageName: String, title: String)
|
||||
private var cellsIsOpen = [Bool]()
|
||||
private let items: [ItemInfo] = [("item0", "Boston"),("item1", "New York"),("item2", "San Francisco"),("item3", "Washington")]
|
||||
|
||||
@IBOutlet weak var pageLabel: UILabel!
|
||||
|
||||
typealias ItemInfo = (imageName: String, title: String)
|
||||
fileprivate var cellsIsOpen = [Bool]()
|
||||
fileprivate let items: [ItemInfo] = [("item0", "Boston"), ("item1", "New York"), ("item2", "San Francisco"), ("item3", "Washington")]
|
||||
|
||||
@IBOutlet var pageLabel: UILabel!
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
// MARK: - Lifecycle 🌎
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
registerCell()
|
||||
fillCellIsOpeenArry()
|
||||
addGestureToView(collectionView!)
|
||||
configureNavBar()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
override func viewDidLoad() {
|
||||
itemSize = CGSize(width: 256, height: 460)
|
||||
super.viewDidLoad()
|
||||
|
||||
registerCell()
|
||||
fillCellIsOpenArray()
|
||||
addGesture(to: collectionView!)
|
||||
configureNavBar()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
private func registerCell() {
|
||||
let nib = UINib(nibName: String(DemoCollectionViewCell), bundle: nil)
|
||||
collectionView?.registerNib(nib, forCellWithReuseIdentifier: String(DemoCollectionViewCell))
|
||||
}
|
||||
|
||||
private func fillCellIsOpeenArry() {
|
||||
for _ in 0..<items.count {
|
||||
cellsIsOpen.append(false)
|
||||
|
||||
fileprivate func registerCell() {
|
||||
|
||||
let nib = UINib(nibName: String(describing: DemoCollectionViewCell.self), bundle: nil)
|
||||
collectionView?.register(nib, forCellWithReuseIdentifier: String(describing: DemoCollectionViewCell.self))
|
||||
}
|
||||
|
||||
fileprivate func fillCellIsOpenArray() {
|
||||
cellsIsOpen = Array(repeating: false, count: items.count)
|
||||
}
|
||||
|
||||
fileprivate func getViewController() -> ExpandingTableViewController {
|
||||
let storyboard = UIStoryboard(storyboard: .Main)
|
||||
let toViewController: DemoTableViewController = storyboard.instantiateViewController()
|
||||
return toViewController
|
||||
}
|
||||
|
||||
fileprivate func configureNavBar() {
|
||||
navigationItem.leftBarButtonItem?.image = navigationItem.leftBarButtonItem?.image!.withRenderingMode(UIImageRenderingMode.alwaysOriginal)
|
||||
}
|
||||
}
|
||||
|
||||
private func getViewController() -> ExpandingTableViewController {
|
||||
let storyboard = UIStoryboard(storyboard: .Main)
|
||||
let toViewController: DemoTableViewController = storyboard.instantiateViewController()
|
||||
return toViewController
|
||||
}
|
||||
|
||||
private func configureNavBar() {
|
||||
navigationItem.leftBarButtonItem?.image = navigationItem.leftBarButtonItem?.image!.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
|
||||
}
|
||||
}
|
||||
|
||||
/// MARK: Gesture
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
private func addGestureToView(toView: UIView) {
|
||||
let gesutereUp = Init(UISwipeGestureRecognizer(target: self, action: #selector(DemoViewController.swipeHandler(_:)))) {
|
||||
$0.direction = .Up
|
||||
}
|
||||
|
||||
let gesutereDown = Init(UISwipeGestureRecognizer(target: self, action: #selector(DemoViewController.swipeHandler(_:)))) {
|
||||
$0.direction = .Down
|
||||
}
|
||||
toView.addGestureRecognizer(gesutereUp)
|
||||
toView.addGestureRecognizer(gesutereDown)
|
||||
}
|
||||
|
||||
func swipeHandler(sender: UISwipeGestureRecognizer) {
|
||||
let indexPath = NSIndexPath(forRow: currentIndex, inSection: 0)
|
||||
guard case let cell as DemoCollectionViewCell = collectionView?.cellForItemAtIndexPath(indexPath) else {
|
||||
return
|
||||
fileprivate func addGesture(to view: UIView) {
|
||||
let upGesture = Init(UISwipeGestureRecognizer(target: self, action: #selector(DemoViewController.swipeHandler(_:)))) {
|
||||
$0.direction = .up
|
||||
}
|
||||
|
||||
let downGesture = Init(UISwipeGestureRecognizer(target: self, action: #selector(DemoViewController.swipeHandler(_:)))) {
|
||||
$0.direction = .down
|
||||
}
|
||||
view.addGestureRecognizer(upGesture)
|
||||
view.addGestureRecognizer(downGesture)
|
||||
}
|
||||
|
||||
// double swipe Up transition
|
||||
if cell.isOpened == true && sender.direction == .Up {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if case let rightButton as AnimatingBarButton = navigationItem.rightBarButtonItem {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
|
||||
@objc func swipeHandler(_ sender: UISwipeGestureRecognizer) {
|
||||
let indexPath = IndexPath(row: currentIndex, section: 0)
|
||||
guard let cell = collectionView?.cellForItem(at: indexPath) as? DemoCollectionViewCell else { return }
|
||||
// double swipe Up transition
|
||||
if cell.isOpened == true && sender.direction == .up {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if let rightButton = navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
}
|
||||
|
||||
let open = sender.direction == .up ? true : false
|
||||
cell.cellIsOpen(open)
|
||||
cellsIsOpen[indexPath.row] = cell.isOpened
|
||||
}
|
||||
|
||||
let open = sender.direction == .Up ? true : false
|
||||
cell.cellIsOpen(open)
|
||||
cellsIsOpen[indexPath.row] = cell.isOpened
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIScrollViewDelegate
|
||||
// MARK: UIScrollViewDelegate
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
func scrollViewDidScroll(scrollView: UIScrollView) {
|
||||
pageLabel.text = "\(currentIndex)/\(items.count)"
|
||||
}
|
||||
|
||||
func scrollViewDidScroll(_: UIScrollView) {
|
||||
pageLabel.text = "\(currentIndex + 1)/\(items.count)"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UICollectionViewDataSource
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
|
||||
guard case let cell as DemoCollectionViewCell = cell else {
|
||||
return
|
||||
|
||||
override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
|
||||
super.collectionView(collectionView, willDisplay: cell, forItemAt: 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[index], animated: false)
|
||||
}
|
||||
let index = indexPath.row % 4
|
||||
let info = items[index]
|
||||
cell.backgroundImageView?.image = UIImage(named: info.imageName)
|
||||
cell.customTitle.text = info.title
|
||||
cell.cellIsOpen(cellsIsOpen[indexPath.row], animated: false)
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
|
||||
guard case let cell as DemoCollectionViewCell = collectionView.cellForItemAtIndexPath(indexPath) else {
|
||||
return
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: IndexPath) {
|
||||
guard let cell = collectionView.cellForItem(at: indexPath) as? DemoCollectionViewCell
|
||||
, currentIndex == indexPath.row else { return }
|
||||
|
||||
if cell.isOpened == false {
|
||||
cell.cellIsOpen(true)
|
||||
} else {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if let rightButton = navigationItem.rightBarButtonItem as? AnimatingBarButton {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
if currentIndex != indexPath.row { return }
|
||||
|
||||
if cell.isOpened == false {
|
||||
cell.cellIsOpen(true)
|
||||
} else {
|
||||
pushToViewController(getViewController())
|
||||
|
||||
if case let rightButton as AnimatingBarButton = navigationItem.rightBarButtonItem {
|
||||
rightButton.animationSelected(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UICollectionViewDataSource
|
||||
|
||||
extension DemoViewController {
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return items.count
|
||||
}
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
return collectionView.dequeueReusableCellWithReuseIdentifier(String(DemoCollectionViewCell), forIndexPath: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
override func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
|
||||
return items.count
|
||||
}
|
||||
|
||||
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
return collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: DemoCollectionViewCell.self), for: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,82 +8,78 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
fileprivate final class CustomView: UIView {
|
||||
var onLayoutSubviews: () -> Void = {}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
onLayoutSubviews()
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatingBarButton: UIBarButtonItem, Rotatable {
|
||||
|
||||
@IBInspectable var normalImageName: String = ""
|
||||
@IBInspectable var selectedImageName: String = ""
|
||||
|
||||
@IBInspectable var duration: Double = 1
|
||||
|
||||
let normalView = UIImageView(frame: .zero)
|
||||
let selectedView = UIImageView(frame: .zero)
|
||||
|
||||
@IBInspectable var normalImageName: String = ""
|
||||
@IBInspectable var selectedImageName: String = ""
|
||||
|
||||
@IBInspectable var duration: Double = 1
|
||||
|
||||
let normalView = UIImageView(frame: .zero)
|
||||
let selectedView = UIImageView(frame: .zero)
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
|
||||
extension AnimatingBarButton {
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
customView = UIView(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
|
||||
// customView?.backgroundColor = .redColor()
|
||||
|
||||
configurateImageViews()
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
let view = CustomView(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
|
||||
view.onLayoutSubviews = { [weak self] in self?.configurateImageViews() }
|
||||
customView = view
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: public
|
||||
|
||||
extension AnimatingBarButton {
|
||||
|
||||
func animationSelected(selected: Bool) {
|
||||
if selected {
|
||||
rotateAnimationFrom(normalView, toItem: selectedView, duration: duration)
|
||||
} else {
|
||||
rotateAnimationFrom(selectedView, toItem: normalView, duration: duration)
|
||||
|
||||
func animationSelected(_ selected: Bool) {
|
||||
if selected {
|
||||
rotateAnimationFrom(normalView, toItem: selectedView, duration: duration)
|
||||
} else {
|
||||
rotateAnimationFrom(selectedView, toItem: normalView, duration: duration)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Create
|
||||
|
||||
extension AnimatingBarButton {
|
||||
|
||||
private func configurateImageViews() {
|
||||
configureImageView(normalView, imageName: normalImageName)
|
||||
configureImageView(selectedView, imageName: selectedImageName)
|
||||
|
||||
selectedView.alpha = 0
|
||||
// normalView.hidden = true
|
||||
}
|
||||
|
||||
private func configureImageView(imageView: UIImageView, imageName: String) {
|
||||
guard let customView = self.customView else {
|
||||
return
|
||||
}
|
||||
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView.image = UIImage(named: imageName)
|
||||
imageView.contentMode = .ScaleAspectFit
|
||||
// imageView.backgroundColor = .greenColor()
|
||||
|
||||
// imageView.layer.anchorPoint = CGPoint(x: 0.5, y: 0.5)
|
||||
customView.addSubview(imageView)
|
||||
|
||||
// add constraints
|
||||
[(NSLayoutAttribute.CenterX, 12), (.CenterY, -1)].forEach { info in
|
||||
(customView, imageView) >>>- {
|
||||
$0.attribute = info.0
|
||||
$0.constant = CGFloat(info.1)
|
||||
}
|
||||
}
|
||||
|
||||
[NSLayoutAttribute.Height, .Width].forEach { attribute in
|
||||
imageView >>>- {
|
||||
$0.attribute = attribute
|
||||
$0.constant = 20
|
||||
}
|
||||
}
|
||||
}
|
||||
fileprivate func configurateImageViews() {
|
||||
configureImageView(normalView, imageName: normalImageName)
|
||||
configureImageView(selectedView, imageName: selectedImageName)
|
||||
|
||||
selectedView.alpha = 0
|
||||
}
|
||||
|
||||
fileprivate func configureImageView(_ imageView: UIImageView, imageName: String) {
|
||||
guard let customView = customView else { return }
|
||||
guard let image = UIImage(named: imageName)?.withRenderingMode(UIImageRenderingMode.alwaysTemplate) else { return }
|
||||
|
||||
imageView.image = image
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.tintColor = tintColor
|
||||
|
||||
imageView.layer.shadowColor = UIColor.black.cgColor
|
||||
imageView.layer.shadowRadius = 0.6
|
||||
imageView.layer.shadowOffset = CGSize(width: 0, height: 1.5)
|
||||
imageView.layer.shadowOpacity = 0.3
|
||||
|
||||
let x = (customView.bounds.size.width - image.size.width) / 2 + 12
|
||||
let y = (customView.bounds.size.height - image.size.height) / 2
|
||||
imageView.frame = CGRect(origin: CGPoint(x: x, y: y), size: image.size)
|
||||
customView.addSubview(imageView)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,34 +9,34 @@
|
||||
import UIKit
|
||||
|
||||
protocol Rotatable {
|
||||
|
||||
func rotateAnimationFrom(fromItem: UIView, toItem: UIView, duration: Double)
|
||||
|
||||
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)
|
||||
let fromOpacity = animationFrom(1, to: 0, key: "opacity", duration: duration)
|
||||
|
||||
let toRotate = animationFrom(-M_PI, to: 0, key: "transform.rotation", duration: duration)
|
||||
let toOpacity = animationFrom(0, to: 1, key: "opacity", duration: duration)
|
||||
|
||||
fromItem.layer.addAnimation(fromRotate, forKey: nil)
|
||||
fromItem.layer.addAnimation(fromOpacity, forKey: nil)
|
||||
|
||||
toItem.layer.addAnimation(toRotate, forKey: nil)
|
||||
toItem.layer.addAnimation(toOpacity, forKey: nil)
|
||||
}
|
||||
|
||||
private func animationFrom(from: Double, to: Double, key: String, duration: Double) -> CABasicAnimation {
|
||||
return Init(CABasicAnimation(keyPath: key)) {
|
||||
$0.duration = duration
|
||||
$0.fromValue = from
|
||||
$0.toValue = to
|
||||
$0.fillMode = kCAFillModeForwards
|
||||
$0.removedOnCompletion = false;
|
||||
func rotateAnimationFrom(_ fromItem: UIView, toItem: UIView, duration: Double) {
|
||||
|
||||
let fromRotate = animationFrom(0, to: Double.pi, key: "transform.rotation", duration: duration)
|
||||
let fromOpacity = animationFrom(1, to: 0, key: "opacity", duration: duration)
|
||||
|
||||
let toRotate = animationFrom(-Double.pi, to: 0, key: "transform.rotation", duration: duration)
|
||||
let toOpacity = animationFrom(0, to: 1, key: "opacity", duration: duration)
|
||||
|
||||
fromItem.layer.add(fromRotate, forKey: nil)
|
||||
fromItem.layer.add(fromOpacity, forKey: nil)
|
||||
|
||||
toItem.layer.add(toRotate, forKey: nil)
|
||||
toItem.layer.add(toOpacity, forKey: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func animationFrom(_ from: Double, to: Double, key: String, duration: Double) -> CABasicAnimation {
|
||||
return Init(CABasicAnimation(keyPath: key)) {
|
||||
$0.duration = duration
|
||||
$0.fromValue = from
|
||||
$0.toValue = to
|
||||
$0.fillMode = kCAFillModeForwards
|
||||
$0.isRemovedOnCompletion = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// DemoExpandingCollectionTests.swift
|
||||
// DemoExpandingCollectionTests
|
||||
//
|
||||
// Created by Alex K. on 25/05/16.
|
||||
// Copyright © 2016 Alex K. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import DemoExpandingCollection
|
||||
|
||||
class DemoExpandingCollectionTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.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>
|
||||
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +1,198 @@
|
||||

|
||||

|
||||
|
||||
|
||||
# expanding-collection
|
||||
|
||||
[](http://twitter.com/Ramotion)
|
||||
[](https://cocoapods.org/pods/expanding-collection)
|
||||
[](http://cocoapods.org/pods/expanding-collection)
|
||||
[](https://github.com/Ramotion/expanding-collection)
|
||||
[](https://travis-ci.org/Ramotion/expanding-collection)
|
||||
[](https://codebeat.co/projects/github-com-ramotion-expanding-collection)
|
||||
|
||||
# Check this library on other platforms:
|
||||
<a href="https://github.com/Ramotion/expanding-collection-android">
|
||||
<img src="https://github.com/ramotion/navigation-stack/raw/master/Android_Java@2x.png" width="178" height="81"></a>
|
||||
|
||||
## About
|
||||
This project is maintained by Ramotion, Inc.<br>
|
||||
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br>
|
||||
|
||||
**Looking for developers for your project?**<br>
|
||||
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
|
||||
|
||||
<a href="https://ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection-contact-us/#Get_in_Touch">
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a> <br>
|
||||
|
||||
|
||||
The [iPhone mockup](https://store.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection) available [here](https://store.ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection).
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 9.0+
|
||||
- Xcode 9.0+
|
||||
|
||||
## 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 expanding_collection
|
||||
```
|
||||
|
||||
#### 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: 460) //IMPORTANT!!! Height of open state cell
|
||||
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 init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
headerHeight = ***
|
||||
}
|
||||
```
|
||||
OR
|
||||
|
||||
``` swift
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
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.
|
||||
|
||||
<br>
|
||||
|
||||
# Get the Showroom App for iOS to give it a try
|
||||
Try this UI component and more like this in our iOS app. Contact us if interested.
|
||||
|
||||
<a href="https://itunes.apple.com/app/apple-store/id1182360240?pt=550053&ct=expanding-collection&mt=8" >
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png" width="117" height="34"></a>
|
||||
<a href="https://ramotion.com/?utm_source=gthb&utm_medium=special&utm_campaign=expanding-collection-contact-us/#Get_in_Touch">
|
||||
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
Follow us for the latest updates<br>
|
||||
[](https://twitter.com/intent/tweet?text=https://github.com/ramotion/expanding-collection)
|
||||
[](https://twitter.com/ramotion)
|
||||
|
||||
@@ -8,42 +8,57 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class ExpandingTableViewController: UITableViewController {
|
||||
|
||||
// MARK: Vars
|
||||
/// Base class for UITableViewcontroller which have back transition method
|
||||
open class ExpandingTableViewController: UITableViewController {
|
||||
|
||||
var headerHeight: CGFloat = 236
|
||||
var transitionDriver: TransitionDriver?
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
// MARK: Vars
|
||||
/// The height of the table view header, set before transition
|
||||
open var headerHeight: CGFloat = 236
|
||||
|
||||
var transitionDriver: TransitionDriver?
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
// MARK: Helpers
|
||||
|
||||
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 backImageOrigin = CGPoint(x: 0, y: height + tableView.contentOffset.y)
|
||||
return view.takeSnapshot(CGRect(origin: backImageOrigin, size: backImageSize))
|
||||
}
|
||||
}
|
||||
// MARK: Public
|
||||
|
||||
extension ExpandingTableViewController {
|
||||
|
||||
public func popTransitionAnimation() {
|
||||
guard let transitionDriver = self.transitionDriver else {
|
||||
return
|
||||
fileprivate 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 + getTabBarHeight())
|
||||
let backImageOrigin = CGPoint(x: 0, y: height + tableView.contentOffset.y)
|
||||
return view.takeSnapshot(CGRect(origin: backImageOrigin, size: backImageSize))
|
||||
}
|
||||
|
||||
let backImage = getScreen()
|
||||
let offset = tableView.contentOffset.y > headerHeight ? headerHeight : tableView.contentOffset.y
|
||||
transitionDriver.popTransitionAnimationContantOffset(offset, backImage: backImage)
|
||||
self.navigationController?.popViewControllerAnimated(false)
|
||||
}
|
||||
|
||||
}
|
||||
fileprivate 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.shared.statusBarFrame.size.height : 0
|
||||
return tabBarHeight + stausBarHeight
|
||||
}
|
||||
}
|
||||
|
||||
// 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()
|
||||
var offset = tableView.contentOffset.y > headerHeight ? headerHeight : tableView.contentOffset.y
|
||||
|
||||
offset += getTabBarHeight()
|
||||
|
||||
transitionDriver.popTransitionAnimationContantOffset(offset, backImage: backImage)
|
||||
_ = navigationController?.popViewController(animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,228 +8,291 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class BasePageCollectionCell: UICollectionViewCell {
|
||||
|
||||
@IBInspectable public var openSize: CGFloat = 40
|
||||
|
||||
// MARK: Constants
|
||||
|
||||
struct Constants {
|
||||
static let backContainer = "backContainerViewKey"
|
||||
static let shadowView = "shadowViewKey"
|
||||
static let frontContainer = "frontContainerKey"
|
||||
/// Base class for UICollectionViewCell
|
||||
open class BasePageCollectionCell: UICollectionViewCell {
|
||||
|
||||
static let backContainerY = "backContainerYKey"
|
||||
static let frontContainerY = "frontContainerYKey"
|
||||
}
|
||||
|
||||
// MARK: Vars
|
||||
/// DEPRECATED! Animation oposition offset when cell is open
|
||||
@IBInspectable open var yOffset: CGFloat = 40
|
||||
/// Spacing between centers of views
|
||||
@IBInspectable open var ySpacing: CGFloat = CGFloat.greatestFiniteMagnitude
|
||||
/// Additional height of back view, when it grows
|
||||
@IBInspectable open var additionalHeight: CGFloat = CGFloat.greatestFiniteMagnitude
|
||||
/// Additional width of back view, when it grows
|
||||
@IBInspectable open var additionalWidth: CGFloat = CGFloat.greatestFiniteMagnitude
|
||||
/// Should front view drow shadow to bottom or not
|
||||
@IBInspectable open var dropShadow: Bool = true
|
||||
|
||||
@IBOutlet weak var frontContainerView: UIView!
|
||||
@IBOutlet weak var backContainerView: UIView!
|
||||
|
||||
@IBOutlet weak var backConstraintY: NSLayoutConstraint!
|
||||
@IBOutlet weak var frontConstraintY: NSLayoutConstraint!
|
||||
|
||||
var shadowView: UIView?
|
||||
public var isOpened = false
|
||||
|
||||
// MARK: inits
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
configureOutletFromDecoder(aDecoder)
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
commonInit()
|
||||
}
|
||||
// MARK: Constants
|
||||
|
||||
struct Constants {
|
||||
static let backContainer = "backContainerViewKey"
|
||||
static let shadowView = "shadowViewKey"
|
||||
static let frontContainer = "frontContainerKey"
|
||||
|
||||
static let backContainerY = "backContainerYKey"
|
||||
static let frontContainerY = "frontContainerYKey"
|
||||
}
|
||||
|
||||
// MARK: Vars
|
||||
|
||||
/// The view used as the face of the cell must connectid from xib or storyboard.
|
||||
@IBOutlet open var frontContainerView: UIView!
|
||||
/// The view used as the back of the cell must connectid from xib or storyboard.
|
||||
@IBOutlet open var backContainerView: UIView!
|
||||
|
||||
/// constraints for backContainerView must connectid from xib or storyboard
|
||||
@IBOutlet open var backConstraintY: NSLayoutConstraint!
|
||||
/// constraints for frontContainerView must connectid from xib or storyboard
|
||||
@IBOutlet open var frontConstraintY: NSLayoutConstraint!
|
||||
|
||||
var shadowView: UIView?
|
||||
|
||||
/// A Boolean value that indicates whether the cell is opened.
|
||||
open var isOpened = false
|
||||
|
||||
// MARK: inits
|
||||
|
||||
/**
|
||||
Initializes a UICollectionViewCell from data in a given unarchiver.
|
||||
|
||||
- parameter aDecoder: An unarchiver object.
|
||||
|
||||
- returns: An initialized UICollectionViewCell object.
|
||||
*/
|
||||
public required 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)
|
||||
|
||||
commonInit()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
|
||||
extension BasePageCollectionCell {
|
||||
|
||||
public override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
commonInit()
|
||||
}
|
||||
|
||||
private func commonInit() {
|
||||
configurationViews()
|
||||
shadowView = createShadowViewOnView(frontContainerView)
|
||||
}
|
||||
|
||||
open override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
commonInit()
|
||||
}
|
||||
|
||||
fileprivate func commonInit() {
|
||||
configurationViews()
|
||||
shadowView = createShadowViewOnView(frontContainerView)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Control
|
||||
// MARK: Control
|
||||
|
||||
extension BasePageCollectionCell {
|
||||
|
||||
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
|
||||
|
||||
if let widthConstant = backContainerView.getConstraint(.Width) {
|
||||
widthConstant.constant = isOpen == true ? contentView.bounds.size.width + openSize : contentView.bounds.size.width
|
||||
|
||||
/**
|
||||
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 }
|
||||
|
||||
if ySpacing == .greatestFiniteMagnitude {
|
||||
frontConstraintY.constant = isOpen == true ? -frontContainerView.bounds.size.height / 6 : 0
|
||||
backConstraintY.constant = isOpen == true ? frontContainerView.bounds.size.height / 6 - yOffset / 2 : 0
|
||||
} else {
|
||||
frontConstraintY.constant = isOpen == true ? -ySpacing / 2 : 0
|
||||
backConstraintY.constant = isOpen == true ? ySpacing / 2 : 0
|
||||
}
|
||||
|
||||
if let widthConstant = backContainerView.getConstraint(.width) {
|
||||
if additionalWidth == .greatestFiniteMagnitude {
|
||||
widthConstant.constant = isOpen == true ? frontContainerView.bounds.size.width + yOffset : frontContainerView.bounds.size.width
|
||||
} else {
|
||||
widthConstant.constant = isOpen == true ? frontContainerView.bounds.size.width + additionalWidth : frontContainerView.bounds.size.width
|
||||
}
|
||||
}
|
||||
|
||||
if let heightConstant = backContainerView.getConstraint(.height) {
|
||||
if additionalHeight == .greatestFiniteMagnitude {
|
||||
heightConstant.constant = isOpen == true ? frontContainerView.bounds.size.height + yOffset : frontContainerView.bounds.size.height
|
||||
} else {
|
||||
heightConstant.constant = isOpen == true ? frontContainerView.bounds.size.height + additionalHeight : frontContainerView.bounds.size.height
|
||||
}
|
||||
}
|
||||
|
||||
isOpened = isOpen
|
||||
|
||||
if animated == true {
|
||||
UIView.animate(withDuration: 0.3, delay: 0, options: UIViewAnimationOptions(), animations: {
|
||||
self.contentView.layoutIfNeeded()
|
||||
}, completion: nil)
|
||||
} else {
|
||||
contentView.layoutIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
if let heightConstant = backContainerView.getConstraint(.Height) {
|
||||
heightConstant.constant = isOpen == true ? contentView.bounds.size.height + openSize : contentView.bounds.size.height
|
||||
}
|
||||
|
||||
if animated == true {
|
||||
UIView.animateWithDuration(0.3, delay: 0, options: .CurveEaseInOut, animations: {
|
||||
self.contentView.layoutIfNeeded()
|
||||
}, completion: nil)
|
||||
} else {
|
||||
self.contentView.layoutIfNeeded()
|
||||
}
|
||||
|
||||
isOpened = isOpen
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Configuration
|
||||
|
||||
extension BasePageCollectionCell {
|
||||
|
||||
private func configurationViews() {
|
||||
backContainerView.layer.masksToBounds = true
|
||||
backContainerView.layer.cornerRadius = 5
|
||||
|
||||
frontContainerView.layer.masksToBounds = true
|
||||
frontContainerView.layer.cornerRadius = 5
|
||||
|
||||
contentView.layer.masksToBounds = false
|
||||
layer.masksToBounds = false
|
||||
}
|
||||
|
||||
private func createShadowViewOnView(view: UIView?) -> UIView? {
|
||||
guard let view = view else {return nil}
|
||||
|
||||
let shadow = Init(UIView(frame: .zero)) {
|
||||
$0.backgroundColor = .clearColor()
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.layer.masksToBounds = false;
|
||||
$0.layer.shadowColor = UIColor.blackColor().CGColor
|
||||
$0.layer.shadowRadius = 10
|
||||
$0.layer.shadowOpacity = 0.3
|
||||
$0.layer.shadowOffset = CGSize(width: 0, height:0)
|
||||
|
||||
fileprivate func configurationViews() {
|
||||
backContainerView.layer.masksToBounds = true
|
||||
backContainerView.layer.cornerRadius = 5
|
||||
|
||||
frontContainerView.layer.masksToBounds = true
|
||||
frontContainerView.layer.cornerRadius = 5
|
||||
|
||||
contentView.layer.masksToBounds = false
|
||||
layer.masksToBounds = false
|
||||
}
|
||||
contentView.insertSubview(shadow, belowSubview: view)
|
||||
|
||||
// create constraints
|
||||
for info: (attribute: NSLayoutAttribute, scale: CGFloat) in [(NSLayoutAttribute.Width, 0.8), (NSLayoutAttribute.Height, 0.9)] {
|
||||
if let frontViewConstraint = view.getConstraint(info.attribute) {
|
||||
shadow >>>- {
|
||||
$0.attribute = info.attribute
|
||||
$0.constant = frontViewConstraint.constant * info.scale
|
||||
|
||||
fileprivate func createShadowViewOnView(_ view: UIView?) -> UIView? {
|
||||
guard let view = view else { return nil }
|
||||
|
||||
let shadow = Init(UIView(frame: .zero)) {
|
||||
$0.backgroundColor = UIColor(white: 0, alpha: 0)
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.layer.masksToBounds = false
|
||||
if dropShadow {
|
||||
$0.layer.shadowColor = UIColor.black.cgColor
|
||||
$0.layer.shadowRadius = 10
|
||||
$0.layer.shadowOpacity = 0.3
|
||||
$0.layer.shadowOffset = CGSize(width: 0, height: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
contentView.insertSubview(shadow, belowSubview: view)
|
||||
|
||||
// create constraints
|
||||
for info: (attribute: NSLayoutAttribute, scale: CGFloat) in [(NSLayoutAttribute.width, 0.8), (NSLayoutAttribute.height, 0.9)] {
|
||||
if let frontViewConstraint = view.getConstraint(info.attribute) {
|
||||
shadow >>>- {
|
||||
$0.attribute = info.attribute
|
||||
$0.constant = frontViewConstraint.constant * info.scale
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for info: (attribute: NSLayoutAttribute, offset: CGFloat) in [(NSLayoutAttribute.centerX, 0), (NSLayoutAttribute.centerY, 30)] {
|
||||
(contentView, shadow, view) >>>- {
|
||||
$0.attribute = info.attribute
|
||||
$0.constant = info.offset
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// size shadow
|
||||
let width = shadow.getConstraint(.width)?.constant
|
||||
let height = shadow.getConstraint(.height)?.constant
|
||||
|
||||
shadow.layer.shadowPath = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: width!, height: height!), cornerRadius: 0).cgPath
|
||||
|
||||
return shadow
|
||||
}
|
||||
|
||||
for info: (attribute: NSLayoutAttribute, offset: CGFloat) in [(NSLayoutAttribute.CenterX, 0), (NSLayoutAttribute.CenterY, 30)] {
|
||||
(contentView, shadow, view) >>>- {
|
||||
$0.attribute = info.attribute
|
||||
$0.constant = info.offset
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
// size shadow
|
||||
let width = shadow.getConstraint(.Width)?.constant
|
||||
let height = shadow.getConstraint(.Height)?.constant
|
||||
|
||||
shadow.layer.shadowPath = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: width!, height: height!), cornerRadius: 0).CGPath
|
||||
|
||||
return shadow
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: NSCoding
|
||||
|
||||
extension BasePageCollectionCell {
|
||||
|
||||
private func highlightedImageFalseOnView(view: UIView) {
|
||||
for item in view.subviews {
|
||||
if case let imageView as UIImageView = item {
|
||||
imageView.highlighted = false
|
||||
}
|
||||
if item.subviews.count > 0 {
|
||||
highlightedImageFalseOnView(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func copyShadowFromView(fromView: UIView, toView: UIView) {
|
||||
fromView.layer.shadowPath = toView.layer.shadowPath
|
||||
fromView.layer.masksToBounds = toView.layer.masksToBounds
|
||||
fromView.layer.shadowColor = toView.layer.shadowColor
|
||||
fromView.layer.shadowRadius = toView.layer.shadowRadius
|
||||
fromView.layer.shadowOpacity = toView.layer.shadowOpacity
|
||||
fromView.layer.shadowOffset = toView.layer.shadowOffset
|
||||
}
|
||||
|
||||
|
||||
func copyCell() -> BasePageCollectionCell? {
|
||||
highlightedImageFalseOnView(contentView)
|
||||
|
||||
let data = NSKeyedArchiver.archivedDataWithRootObject(self)
|
||||
guard case let copyView as BasePageCollectionCell = NSKeyedUnarchiver.unarchiveObjectWithData(data),
|
||||
let shadowView = self.shadowView else {
|
||||
return nil
|
||||
fileprivate func highlightedImageFalseOnView(_ view: UIView) {
|
||||
for item in view.subviews {
|
||||
if case let imageView as UIImageView = item {
|
||||
imageView.isHighlighted = false
|
||||
}
|
||||
if item.subviews.count > 0 {
|
||||
highlightedImageFalseOnView(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// configure
|
||||
copyView.backContainerView.layer.masksToBounds = backContainerView.layer.masksToBounds
|
||||
copyView.backContainerView.layer.cornerRadius = backContainerView.layer.cornerRadius
|
||||
|
||||
copyView.frontContainerView.layer.masksToBounds = frontContainerView.layer.masksToBounds
|
||||
copyView.frontContainerView.layer.cornerRadius = frontContainerView.layer.cornerRadius
|
||||
|
||||
// copy shadow layer
|
||||
copyShadowFromView(copyView.shadowView!, toView: shadowView)
|
||||
|
||||
for index in 0..<copyView.frontContainerView.subviews.count {
|
||||
copyShadowFromView(copyView.frontContainerView.subviews[index], toView: frontContainerView.subviews[index])
|
||||
fileprivate func copyShadowFromView(_ fromView: UIView, toView: UIView) {
|
||||
fromView.layer.shadowPath = toView.layer.shadowPath
|
||||
fromView.layer.masksToBounds = toView.layer.masksToBounds
|
||||
fromView.layer.shadowColor = toView.layer.shadowColor
|
||||
fromView.layer.shadowRadius = toView.layer.shadowRadius
|
||||
fromView.layer.shadowOpacity = toView.layer.shadowOpacity
|
||||
fromView.layer.shadowOffset = toView.layer.shadowOffset
|
||||
}
|
||||
return copyView
|
||||
}
|
||||
|
||||
public override func encodeWithCoder(coder: NSCoder) {
|
||||
super.encodeWithCoder(coder)
|
||||
coder.encodeObject(backContainerView, forKey: Constants.backContainer)
|
||||
coder.encodeObject(frontContainerView, forKey: Constants.frontContainer)
|
||||
coder.encodeObject(frontConstraintY, forKey: Constants.frontContainerY)
|
||||
coder.encodeObject(backConstraintY, forKey: Constants.backContainerY)
|
||||
coder.encodeObject(shadowView, forKey: Constants.shadowView)
|
||||
}
|
||||
|
||||
private func configureOutletFromDecoder(coder: NSCoder) {
|
||||
if case let shadowView as UIView = coder.decodeObjectForKey(Constants.shadowView) {
|
||||
self.shadowView = shadowView
|
||||
|
||||
func copyCell() -> BasePageCollectionCell? {
|
||||
highlightedImageFalseOnView(contentView)
|
||||
|
||||
let data = NSKeyedArchiver.archivedData(withRootObject: self)
|
||||
guard case let copyView as BasePageCollectionCell = NSKeyedUnarchiver.unarchiveObject(with: data),
|
||||
let shadowView = self.shadowView else {
|
||||
return nil
|
||||
}
|
||||
|
||||
// configure
|
||||
copyView.backContainerView.layer.masksToBounds = backContainerView.layer.masksToBounds
|
||||
copyView.backContainerView.layer.cornerRadius = backContainerView.layer.cornerRadius
|
||||
|
||||
copyView.frontContainerView.layer.masksToBounds = frontContainerView.layer.masksToBounds
|
||||
copyView.frontContainerView.layer.cornerRadius = frontContainerView.layer.cornerRadius
|
||||
|
||||
// copy shadow layer
|
||||
copyShadowFromView(copyView.shadowView!, toView: shadowView)
|
||||
|
||||
for index in 0 ..< copyView.frontContainerView.subviews.count {
|
||||
copyShadowFromView(copyView.frontContainerView.subviews[index], toView: frontContainerView.subviews[index])
|
||||
}
|
||||
return copyView
|
||||
}
|
||||
|
||||
if case let backView as UIView = coder.decodeObjectForKey(Constants.backContainer) {
|
||||
backContainerView = backView
|
||||
|
||||
open override func encode(with coder: NSCoder) {
|
||||
super.encode(with: coder)
|
||||
coder.encode(backContainerView, forKey: Constants.backContainer)
|
||||
coder.encode(frontContainerView, forKey: Constants.frontContainer)
|
||||
coder.encode(frontConstraintY, forKey: Constants.frontContainerY)
|
||||
coder.encode(backConstraintY, forKey: Constants.backContainerY)
|
||||
coder.encode(shadowView, forKey: Constants.shadowView)
|
||||
}
|
||||
|
||||
if case let frontView as UIView = coder.decodeObjectForKey(Constants.frontContainer) {
|
||||
frontContainerView = frontView
|
||||
|
||||
fileprivate func configureOutletFromDecoder(_ coder: NSCoder) {
|
||||
if case let shadowView as UIView = coder.decodeObject(forKey: Constants.shadowView) {
|
||||
self.shadowView = shadowView
|
||||
}
|
||||
|
||||
if case let backView as UIView = coder.decodeObject(forKey: Constants.backContainer) {
|
||||
backContainerView = backView
|
||||
}
|
||||
|
||||
if case let frontView as UIView = coder.decodeObject(forKey: Constants.frontContainer) {
|
||||
frontContainerView = frontView
|
||||
}
|
||||
|
||||
if case let constraint as NSLayoutConstraint = coder.decodeObject(forKey: Constants.frontContainerY) {
|
||||
frontConstraintY = constraint
|
||||
}
|
||||
|
||||
if case let constraint as NSLayoutConstraint = coder.decodeObject(forKey: Constants.backContainerY) {
|
||||
backConstraintY = constraint
|
||||
}
|
||||
}
|
||||
|
||||
if case let constraint as NSLayoutConstraint = coder.decodeObjectForKey(Constants.frontContainerY) {
|
||||
frontConstraintY = constraint
|
||||
}
|
||||
|
||||
if case let constraint as NSLayoutConstraint = coder.decodeObjectForKey(Constants.backContainerY) {
|
||||
backConstraintY = constraint
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,141 +9,141 @@
|
||||
import UIKit
|
||||
|
||||
class PageCollectionLayout: UICollectionViewFlowLayout {
|
||||
|
||||
private var lastCollectionViewSize: CGSize = CGSizeZero
|
||||
|
||||
var scalingOffset: CGFloat = 200
|
||||
var minimumScaleFactor: CGFloat = 0.9
|
||||
var minimumAlphaFactor: CGFloat = 0.3
|
||||
var scaleItems: Bool = true
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
init(itemSize: CGSize) {
|
||||
super.init()
|
||||
commonInit(itemSize)
|
||||
}
|
||||
|
||||
fileprivate var lastCollectionViewSize: CGSize = CGSize.zero
|
||||
|
||||
var scalingOffset: CGFloat = 200
|
||||
var minimumScaleFactor: CGFloat = 0.9
|
||||
var minimumAlphaFactor: CGFloat = 0.3
|
||||
var scaleItems: Bool = true
|
||||
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
init(itemSize: CGSize) {
|
||||
super.init()
|
||||
commonInit(itemSize)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
|
||||
extension PageCollectionLayout {
|
||||
|
||||
private func commonInit(itemSize: CGSize) {
|
||||
scrollDirection = .Horizontal
|
||||
minimumLineSpacing = 25
|
||||
self.itemSize = itemSize
|
||||
}
|
||||
|
||||
fileprivate func commonInit(_ itemSize: CGSize) {
|
||||
scrollDirection = .horizontal
|
||||
minimumLineSpacing = 25
|
||||
self.itemSize = itemSize
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: override
|
||||
|
||||
extension PageCollectionLayout {
|
||||
|
||||
override func invalidateLayoutWithContext(context: UICollectionViewLayoutInvalidationContext) {
|
||||
super.invalidateLayoutWithContext(context)
|
||||
|
||||
guard let collectionView = self.collectionView else { return }
|
||||
|
||||
if collectionView.bounds.size != lastCollectionViewSize {
|
||||
self.configureInset()
|
||||
self.lastCollectionViewSize = collectionView.bounds.size
|
||||
|
||||
override func invalidateLayout(with context: UICollectionViewLayoutInvalidationContext) {
|
||||
super.invalidateLayout(with: context)
|
||||
|
||||
guard let collectionView = self.collectionView else { return }
|
||||
|
||||
if collectionView.bounds.size != lastCollectionViewSize {
|
||||
configureInset()
|
||||
lastCollectionViewSize = collectionView.bounds.size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func targetContentOffsetForProposedContentOffset(proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
|
||||
guard let collectionView = self.collectionView else {
|
||||
return proposedContentOffset
|
||||
|
||||
override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
|
||||
guard let collectionView = self.collectionView else {
|
||||
return proposedContentOffset
|
||||
}
|
||||
|
||||
let proposedRect = CGRect(x: proposedContentOffset.x, y: 0, width: collectionView.bounds.width, height: collectionView.bounds.height)
|
||||
guard let layoutAttributes = self.layoutAttributesForElements(in: proposedRect) else {
|
||||
return proposedContentOffset
|
||||
}
|
||||
|
||||
var candidateAttributes: UICollectionViewLayoutAttributes?
|
||||
let proposedContentOffsetCenterX = proposedContentOffset.x + collectionView.bounds.width / 2
|
||||
|
||||
for attributes in layoutAttributes {
|
||||
if attributes.representedElementCategory != .cell {
|
||||
continue
|
||||
}
|
||||
|
||||
if candidateAttributes == nil {
|
||||
candidateAttributes = attributes
|
||||
continue
|
||||
}
|
||||
|
||||
if fabs(attributes.center.x - proposedContentOffsetCenterX) < fabs(candidateAttributes!.center.x - proposedContentOffsetCenterX) {
|
||||
candidateAttributes = attributes
|
||||
}
|
||||
}
|
||||
|
||||
guard let aCandidateAttributes = candidateAttributes else {
|
||||
return proposedContentOffset
|
||||
}
|
||||
|
||||
var newOffsetX = aCandidateAttributes.center.x - collectionView.bounds.size.width / 2
|
||||
let offset = newOffsetX - collectionView.contentOffset.x
|
||||
|
||||
if (velocity.x < 0 && offset > 0) || (velocity.x > 0 && offset < 0) {
|
||||
let pageWidth = itemSize.width + minimumLineSpacing
|
||||
newOffsetX += velocity.x > 0 ? pageWidth : -pageWidth
|
||||
}
|
||||
|
||||
return CGPoint(x: newOffsetX, y: proposedContentOffset.y)
|
||||
}
|
||||
|
||||
let proposedRect = CGRectMake(proposedContentOffset.x, 0, collectionView.bounds.width, collectionView.bounds.height)
|
||||
guard let layoutAttributes = self.layoutAttributesForElementsInRect(proposedRect) else {
|
||||
return proposedContentOffset
|
||||
|
||||
override func shouldInvalidateLayout(forBoundsChange _: CGRect) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
var candidateAttributes: UICollectionViewLayoutAttributes?
|
||||
let proposedContentOffsetCenterX = proposedContentOffset.x + collectionView.bounds.width / 2
|
||||
|
||||
for attributes in layoutAttributes {
|
||||
if attributes.representedElementCategory != .Cell {
|
||||
continue
|
||||
}
|
||||
|
||||
if candidateAttributes == nil {
|
||||
candidateAttributes = attributes
|
||||
continue
|
||||
}
|
||||
|
||||
if fabs(attributes.center.x - proposedContentOffsetCenterX) < fabs(candidateAttributes!.center.x - proposedContentOffsetCenterX) {
|
||||
candidateAttributes = attributes
|
||||
}
|
||||
|
||||
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
|
||||
guard let collectionView = self.collectionView,
|
||||
let superAttributes = super.layoutAttributesForElements(in: rect) else {
|
||||
return super.layoutAttributesForElements(in: rect)
|
||||
}
|
||||
if scaleItems == false {
|
||||
return super.layoutAttributesForElements(in: rect)
|
||||
}
|
||||
|
||||
let contentOffset = collectionView.contentOffset
|
||||
let size = collectionView.bounds.size
|
||||
|
||||
let visibleRect = CGRect(x: contentOffset.x, y: contentOffset.y, width: size.width, height: size.height)
|
||||
let visibleCenterX = visibleRect.midX
|
||||
|
||||
guard case let newAttributesArray as [UICollectionViewLayoutAttributes] = NSArray(array: superAttributes, copyItems: true) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
newAttributesArray.forEach {
|
||||
let distanceFromCenter = visibleCenterX - $0.center.x
|
||||
let absDistanceFromCenter = min(abs(distanceFromCenter), self.scalingOffset)
|
||||
let scale = absDistanceFromCenter * (self.minimumScaleFactor - 1) / self.scalingOffset + 1
|
||||
$0.transform3D = CATransform3DScale(CATransform3DIdentity, scale, scale, 1)
|
||||
|
||||
let alpha = absDistanceFromCenter * (self.minimumAlphaFactor - 1) / self.scalingOffset + 1
|
||||
$0.alpha = alpha
|
||||
}
|
||||
|
||||
return newAttributesArray
|
||||
}
|
||||
|
||||
guard let aCandidateAttributes = candidateAttributes else {
|
||||
return proposedContentOffset
|
||||
}
|
||||
|
||||
var newOffsetX = aCandidateAttributes.center.x - collectionView.bounds.size.width / 2
|
||||
let offset = newOffsetX - collectionView.contentOffset.x
|
||||
|
||||
if (velocity.x < 0 && offset > 0) || (velocity.x > 0 && offset < 0) {
|
||||
let pageWidth = self.itemSize.width + self.minimumLineSpacing
|
||||
newOffsetX += velocity.x > 0 ? pageWidth : -pageWidth
|
||||
}
|
||||
|
||||
return CGPointMake(newOffsetX, proposedContentOffset.y)
|
||||
}
|
||||
|
||||
override func shouldInvalidateLayoutForBoundsChange(newBounds: CGRect) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
override func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
|
||||
guard let collectionView = self.collectionView,
|
||||
let superAttributes = super.layoutAttributesForElementsInRect(rect) else {
|
||||
return super.layoutAttributesForElementsInRect(rect)
|
||||
}
|
||||
if scaleItems == false{
|
||||
return super.layoutAttributesForElementsInRect(rect)
|
||||
}
|
||||
|
||||
let contentOffset = collectionView.contentOffset
|
||||
let size = collectionView.bounds.size
|
||||
|
||||
let visibleRect = CGRectMake(contentOffset.x, contentOffset.y, size.width, size.height)
|
||||
let visibleCenterX = CGRectGetMidX(visibleRect)
|
||||
|
||||
guard case let newAttributesArray as [UICollectionViewLayoutAttributes] = NSArray(array: superAttributes, copyItems: true) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
newAttributesArray.forEach {
|
||||
let distanceFromCenter = visibleCenterX - $0.center.x
|
||||
let absDistanceFromCenter = min(abs(distanceFromCenter), self.scalingOffset)
|
||||
let scale = absDistanceFromCenter * (self.minimumScaleFactor - 1) / self.scalingOffset + 1
|
||||
$0.transform3D = CATransform3DScale(CATransform3DIdentity, scale, scale, 1)
|
||||
|
||||
let alpha = absDistanceFromCenter * (self.minimumAlphaFactor - 1) / self.scalingOffset + 1
|
||||
$0.alpha = alpha
|
||||
}
|
||||
|
||||
return newAttributesArray
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: helpers
|
||||
|
||||
extension PageCollectionLayout {
|
||||
|
||||
private func configureInset() -> Void {
|
||||
guard let collectionView = self.collectionView else {
|
||||
return
|
||||
|
||||
fileprivate func configureInset() {
|
||||
guard let collectionView = self.collectionView else {
|
||||
return
|
||||
}
|
||||
|
||||
let inset = collectionView.bounds.size.width / 2 - itemSize.width / 2
|
||||
collectionView.contentInset = UIEdgeInsetsMake(0, inset, 0, inset)
|
||||
collectionView.contentOffset = CGPoint(x: -inset, y: 0)
|
||||
}
|
||||
|
||||
let inset = collectionView.bounds.size.width / 2 - itemSize.width / 2
|
||||
collectionView.contentInset = UIEdgeInsetsMake(0, inset, 0, inset)
|
||||
collectionView.contentOffset = CGPointMake(-inset, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,39 +9,41 @@
|
||||
import UIKit
|
||||
|
||||
class PageCollectionView: UICollectionView {
|
||||
|
||||
}
|
||||
|
||||
// MARK: init
|
||||
|
||||
extension PageCollectionView {
|
||||
|
||||
class func createOnView(view: UIView,
|
||||
layout: UICollectionViewLayout,
|
||||
height:CGFloat,
|
||||
dataSource: UICollectionViewDataSource,
|
||||
delegate: UICollectionViewDelegate) -> PageCollectionView {
|
||||
|
||||
let collectionView = Init(PageCollectionView(frame: CGRect.zero, collectionViewLayout: layout)) {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.decelerationRate = UIScrollViewDecelerationRateFast
|
||||
$0.showsHorizontalScrollIndicator = false
|
||||
$0.dataSource = dataSource
|
||||
$0.delegate = delegate
|
||||
$0.backgroundColor = .clearColor()
|
||||
|
||||
class func createOnView(_ view: UIView,
|
||||
layout: UICollectionViewLayout,
|
||||
height: CGFloat,
|
||||
dataSource: UICollectionViewDataSource,
|
||||
delegate: UICollectionViewDelegate) -> PageCollectionView {
|
||||
|
||||
let collectionView = Init(PageCollectionView(frame: CGRect.zero, collectionViewLayout: layout)) {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.decelerationRate = UIScrollViewDecelerationRateFast
|
||||
$0.showsHorizontalScrollIndicator = false
|
||||
$0.dataSource = dataSource
|
||||
$0.delegate = delegate
|
||||
$0.backgroundColor = UIColor(white: 0, alpha: 0)
|
||||
}
|
||||
view.addSubview(collectionView)
|
||||
|
||||
// add constraints
|
||||
collectionView >>>- {
|
||||
$0.attribute = .height
|
||||
$0.constant = height
|
||||
return
|
||||
}
|
||||
[NSLayoutAttribute.left, .right, .centerY].forEach { attribute in
|
||||
(view, collectionView) >>>- {
|
||||
$0.attribute = attribute
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return collectionView
|
||||
}
|
||||
view.addSubview(collectionView)
|
||||
|
||||
// add constraints
|
||||
collectionView >>>- {
|
||||
$0.attribute = .Height
|
||||
$0.constant = height
|
||||
}
|
||||
[NSLayoutAttribute.Left, .Right, .CenterY].forEach { attribute in
|
||||
(view, collectionView) >>>- { $0.attribute = attribute }
|
||||
}
|
||||
|
||||
return collectionView
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,90 +8,122 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class ExpandingViewController: UIViewController {
|
||||
|
||||
public var itemSize = CGSize(width: 256, height: 335)
|
||||
public var collectionView: UICollectionView?
|
||||
private var transitionDriver: TransitionDriver?
|
||||
|
||||
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))
|
||||
}
|
||||
/// UIViewController with UICollectionView with custom transition method
|
||||
open class ExpandingViewController: UIViewController {
|
||||
|
||||
/// The default size to use for cells. Height of open cell state
|
||||
open var itemSize = CGSize(width: 256, height: 460)
|
||||
|
||||
/// The collection view object managed by this view controller.
|
||||
open var collectionView: UICollectionView?
|
||||
|
||||
fileprivate var transitionDriver: TransitionDriver?
|
||||
|
||||
/// Index of current cell
|
||||
open var currentIndex: Int {
|
||||
guard let collectionView = self.collectionView else { return 0 }
|
||||
|
||||
let startOffset = (collectionView.bounds.size.width - itemSize.width) / 2
|
||||
guard let collectionLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout else {
|
||||
return 0
|
||||
}
|
||||
|
||||
let minimumLineSpacing = collectionLayout.minimumLineSpacing
|
||||
let a = collectionView.contentOffset.x + startOffset + itemSize.width / 2
|
||||
let b = itemSize.width + minimumLineSpacing
|
||||
return Int(a / b)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: life cicle
|
||||
|
||||
extension ExpandingViewController {
|
||||
|
||||
public override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
commonInit()
|
||||
}
|
||||
|
||||
open override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
commonInit()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Transition
|
||||
|
||||
extension ExpandingViewController {
|
||||
|
||||
func pushToViewController(viewController: ExpandingTableViewController) {
|
||||
guard let collectionView = self.collectionView else {
|
||||
return
|
||||
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,
|
||||
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.shared.statusBarFrame.size.height : 0
|
||||
let backImage = getBackImage(viewController, headerHeight: viewController.headerHeight)
|
||||
|
||||
transitionDriver?.pushTransitionAnimationIndex(currentIndex,
|
||||
collecitionView: collectionView,
|
||||
backImage: backImage,
|
||||
headerHeight: viewController.headerHeight,
|
||||
insets: tabBarHeight + stausBarHeight) { headerView in
|
||||
viewController.tableView.tableHeaderView = headerView
|
||||
self.navigationController?.pushViewController(viewController, animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
viewController.transitionDriver = transitionDriver
|
||||
let backImage = getBackImage(viewController, headerHeight: viewController.headerHeight)
|
||||
|
||||
transitionDriver?.pushTransitionAnimationIndex(currentIndex,
|
||||
collecitionView: collectionView,
|
||||
backImage: backImage,
|
||||
headerHeight: viewController.headerHeight) { headerView in
|
||||
viewController.tableView.tableHeaderView = headerView
|
||||
self.navigationController?.pushViewController(viewController, animated: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: create
|
||||
|
||||
extension ExpandingViewController {
|
||||
|
||||
private func commonInit() {
|
||||
|
||||
let layout = PageCollectionLayout(itemSize: itemSize)
|
||||
collectionView = PageCollectionView.createOnView(view,
|
||||
layout: layout,
|
||||
height: itemSize.height + itemSize.height / 5 * 2,
|
||||
dataSource: self,
|
||||
delegate: self)
|
||||
transitionDriver = TransitionDriver(view: view)
|
||||
}
|
||||
|
||||
fileprivate func commonInit() {
|
||||
|
||||
let layout = PageCollectionLayout(itemSize: itemSize)
|
||||
collectionView = PageCollectionView.createOnView(view,
|
||||
layout: layout,
|
||||
height: itemSize.height,
|
||||
dataSource: self,
|
||||
delegate: self)
|
||||
if #available(iOS 10.0, *) {
|
||||
collectionView?.isPrefetchingEnabled = false
|
||||
}
|
||||
transitionDriver = TransitionDriver(view: view)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
|
||||
extension ExpandingViewController {
|
||||
|
||||
private func getBackImage(viewController: UIViewController, headerHeight: CGFloat) -> UIImage? {
|
||||
let imageSize = CGSize(width: viewController.view.bounds.width, height: viewController.view.bounds.height - headerHeight)
|
||||
let imageFrame = CGRect(origin: CGPoint(x: 0, y: 0), size: imageSize)
|
||||
return viewController.view.takeSnapshot(imageFrame)
|
||||
}
|
||||
|
||||
fileprivate func getBackImage(_ viewController: UIViewController, headerHeight: CGFloat) -> UIImage? {
|
||||
let imageSize = CGSize(width: viewController.view.bounds.width, height: viewController.view.bounds.height - headerHeight)
|
||||
let imageFrame = CGRect(origin: CGPoint(x: 0, y: 0), size: imageSize)
|
||||
return viewController.view.takeSnapshot(imageFrame)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UICollectionViewDataSource
|
||||
|
||||
extension ExpandingViewController: UICollectionViewDataSource, UICollectionViewDelegate{
|
||||
|
||||
public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
fatalError("need emplementation in subclass")
|
||||
}
|
||||
|
||||
public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
fatalError("need emplementation in subclass")
|
||||
}
|
||||
}
|
||||
extension ExpandingViewController: UICollectionViewDataSource, UICollectionViewDelegate {
|
||||
|
||||
open func collectionView(_: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt _: IndexPath) {
|
||||
guard case let cell as BasePageCollectionCell = cell else {
|
||||
return
|
||||
}
|
||||
|
||||
cell.configureCellViewConstraintsWithSize(itemSize)
|
||||
}
|
||||
|
||||
open func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
|
||||
fatalError("need emplementation in subclass")
|
||||
}
|
||||
|
||||
open func collectionView(_: UICollectionView, cellForItemAt _: IndexPath) -> UICollectionViewCell {
|
||||
fatalError("need emplementation in subclass")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,23 +8,22 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
|
||||
protocol CornerAnimatable {
|
||||
func animationCornerRadius(radius: CGFloat, duration: Double)
|
||||
func animationCornerRadius(_ radius: CGFloat, duration: Double)
|
||||
}
|
||||
|
||||
extension CornerAnimatable where Self: UIView {
|
||||
|
||||
func animationCornerRadius(radius: CGFloat, duration: Double) {
|
||||
let animation = Init(CABasicAnimation(keyPath: "cornerRadius")) {
|
||||
$0.duration = duration
|
||||
$0.toValue = radius
|
||||
$0.fillMode = kCAFillModeForwards
|
||||
$0.removedOnCompletion = false;
|
||||
|
||||
func animationCornerRadius(_ radius: CGFloat, duration: Double) {
|
||||
let animation = Init(CABasicAnimation(keyPath: "cornerRadius")) {
|
||||
$0.duration = duration
|
||||
$0.toValue = radius
|
||||
$0.fillMode = kCAFillModeForwards
|
||||
$0.isRemovedOnCompletion = false
|
||||
}
|
||||
|
||||
layer.add(animation, forKey: nil)
|
||||
}
|
||||
|
||||
layer.addAnimation(animation, forKey: nil)
|
||||
}
|
||||
}
|
||||
|
||||
extension UIView: CornerAnimatable {}
|
||||
extension UIView: CornerAnimatable {}
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@warn_unused_result
|
||||
internal func Init<Type>(value : Type, @noescape block: (object: Type) -> Void) -> Type
|
||||
{
|
||||
block(object: value)
|
||||
return value
|
||||
internal func Init<Type>(_ value: Type, block: (_ object: Type) -> Void) -> Type {
|
||||
block(value)
|
||||
return value
|
||||
}
|
||||
|
||||
@@ -9,83 +9,92 @@
|
||||
import UIKit
|
||||
|
||||
struct ConstraintInfo {
|
||||
var attribute: NSLayoutAttribute = .Left
|
||||
var secondAttribute: NSLayoutAttribute = .NotAnAttribute
|
||||
var constant: CGFloat = 0
|
||||
var identifier: String?
|
||||
var relation: NSLayoutRelation = .Equal
|
||||
var attribute: NSLayoutAttribute = .left
|
||||
var secondAttribute: NSLayoutAttribute = .notAnAttribute
|
||||
var constant: CGFloat = 0
|
||||
var identifier: String?
|
||||
var relation: NSLayoutRelation = .equal
|
||||
}
|
||||
|
||||
infix operator >>>- { associativity left precedence 150 }
|
||||
|
||||
func >>>- <T: UIView> (left: (T, T), @noescape block: (inout ConstraintInfo) -> ()) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
info.secondAttribute = info.secondAttribute == .NotAnAttribute ? info.attribute : info.secondAttribute
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left.1,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: left.0,
|
||||
attribute: info.secondAttribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.0.addConstraint(constraint)
|
||||
return constraint
|
||||
precedencegroup ConstOp {
|
||||
associativity: left
|
||||
higherThan: AssignmentPrecedence
|
||||
}
|
||||
|
||||
func >>>- <T: UIView> (left: T, @noescape block: (inout ConstraintInfo) -> ()) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: nil,
|
||||
attribute: info.attribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.addConstraint(constraint)
|
||||
return constraint
|
||||
infix operator >>>-: ConstOp
|
||||
|
||||
@discardableResult
|
||||
func >>>- <T: UIView>(left: (T, T), block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
info.secondAttribute = info.secondAttribute == .notAnAttribute ? info.attribute : info.secondAttribute
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left.1,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: left.0,
|
||||
attribute: info.secondAttribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.0.addConstraint(constraint)
|
||||
return constraint
|
||||
}
|
||||
|
||||
func >>>- <T: UIView> (left: (T, T, T), @noescape block: (inout ConstraintInfo) -> ()) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
info.secondAttribute = info.secondAttribute == .NotAnAttribute ? info.attribute : info.secondAttribute
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left.1,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: left.2,
|
||||
attribute: info.secondAttribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.0.addConstraint(constraint)
|
||||
return constraint
|
||||
@discardableResult
|
||||
func >>>- <T: UIView>(left: T, block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: nil,
|
||||
attribute: info.attribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.addConstraint(constraint)
|
||||
return constraint
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func >>>- <T: UIView>(left: (T, T, T), block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
|
||||
var info = ConstraintInfo()
|
||||
block(&info)
|
||||
info.secondAttribute = info.secondAttribute == .notAnAttribute ? info.attribute : info.secondAttribute
|
||||
|
||||
let constraint = NSLayoutConstraint(item: left.1,
|
||||
attribute: info.attribute,
|
||||
relatedBy: info.relation,
|
||||
toItem: left.2,
|
||||
attribute: info.secondAttribute,
|
||||
multiplier: 1,
|
||||
constant: info.constant)
|
||||
constraint.identifier = info.identifier
|
||||
left.0.addConstraint(constraint)
|
||||
return constraint
|
||||
}
|
||||
|
||||
// MARK: UIView
|
||||
|
||||
extension UIView {
|
||||
|
||||
func addScaleToFillConstratinsOnView(view: UIView) {
|
||||
[NSLayoutAttribute.Left, .Right, .Top, .Bottom].forEach { attribute in
|
||||
(self, view) >>>- { $0.attribute = attribute }
|
||||
|
||||
func addScaleToFillConstratinsOnView(_ view: UIView) {
|
||||
[NSLayoutAttribute.left, .right, .top, .bottom].forEach { attribute in
|
||||
(self, view) >>>- {
|
||||
$0.attribute = attribute
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getConstraint(attributes: NSLayoutAttribute) -> NSLayoutConstraint? {
|
||||
return constraints.filter {
|
||||
if $0.firstAttribute == attributes && $0.secondItem == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}.first
|
||||
}
|
||||
|
||||
|
||||
func getConstraint(_ attributes: NSLayoutAttribute) -> NSLayoutConstraint? {
|
||||
return constraints.filter {
|
||||
if $0.firstAttribute == attributes && $0.secondItem == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}.first
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
import UIKit
|
||||
|
||||
extension UIView {
|
||||
func takeSnapshot(frame: CGRect) -> UIImage? {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
|
||||
|
||||
let context = UIGraphicsGetCurrentContext();
|
||||
CGContextTranslateCTM(context, frame.origin.x * -1, frame.origin.y * -1)
|
||||
|
||||
guard let currentContext = UIGraphicsGetCurrentContext() else {
|
||||
return nil
|
||||
func takeSnapshot(_ frame: CGRect) -> UIImage? {
|
||||
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
|
||||
|
||||
let context = UIGraphicsGetCurrentContext()
|
||||
context?.translateBy(x: frame.origin.x * -1, y: frame.origin.y * -1)
|
||||
|
||||
guard let currentContext = UIGraphicsGetCurrentContext() else {
|
||||
return nil
|
||||
}
|
||||
|
||||
layer.render(in: currentContext)
|
||||
let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||
UIGraphicsEndImageContext()
|
||||
|
||||
return image
|
||||
}
|
||||
|
||||
self.layer.renderInContext(currentContext)
|
||||
let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||
UIGraphicsEndImageContext()
|
||||
|
||||
return image
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,24 +9,24 @@
|
||||
import UIKit
|
||||
|
||||
protocol SubviewsForEach {
|
||||
func subviewsForEach(f: UIView -> Void)
|
||||
func subviewsForEach(_ f: (UIView) -> Void)
|
||||
}
|
||||
|
||||
extension SubviewsForEach where Self: UIView {
|
||||
|
||||
func subviewsForEach(f: UIView -> Void) {
|
||||
forEachView(self, f: f)
|
||||
}
|
||||
|
||||
private func forEachView(view: UIView, f: UIView -> Void) {
|
||||
view.subviews.forEach {
|
||||
f($0)
|
||||
|
||||
if $0.subviews.count > 0 {
|
||||
forEachView($0, f: f)
|
||||
}
|
||||
|
||||
func subviewsForEach(_ f: (UIView) -> Void) {
|
||||
forEachView(self, f: f)
|
||||
}
|
||||
|
||||
fileprivate func forEachView(_ view: UIView, f: (UIView) -> Void) {
|
||||
view.subviews.forEach {
|
||||
f($0)
|
||||
|
||||
if $0.subviews.count > 0 {
|
||||
forEachView($0, f: f)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension UIView: SubviewsForEach {}
|
||||
extension UIView: SubviewsForEach {}
|
||||
|
||||
@@ -9,249 +9,259 @@
|
||||
import UIKit
|
||||
|
||||
class TransitionDriver {
|
||||
|
||||
// MARK: Constants
|
||||
struct Constants {
|
||||
static let HideKey = 101
|
||||
}
|
||||
|
||||
// MARK: Vars
|
||||
|
||||
private let view: UIView
|
||||
private let duration: Double = 0.4
|
||||
|
||||
// for push animation
|
||||
private var copyCell: BasePageCollectionCell?
|
||||
private var currentCell: BasePageCollectionCell?
|
||||
private var backImageView: UIImageView?
|
||||
|
||||
private var leftCell: UICollectionViewCell?
|
||||
private var rightCell: UICollectionViewCell?
|
||||
private var step: CGFloat = 0
|
||||
|
||||
private var frontViewFrame = CGRect.zero
|
||||
private var backViewFrame = CGRect.zero
|
||||
|
||||
init(view: UIView) {
|
||||
self.view = view
|
||||
}
|
||||
|
||||
// MARK: Constants
|
||||
|
||||
struct Constants {
|
||||
static let HideKey = 101
|
||||
}
|
||||
|
||||
// MARK: Vars
|
||||
|
||||
fileprivate let view: UIView
|
||||
fileprivate let duration: Double = 0.4
|
||||
|
||||
// for push animation
|
||||
fileprivate var copyCell: BasePageCollectionCell?
|
||||
fileprivate var currentCell: BasePageCollectionCell?
|
||||
fileprivate var backImageView: UIImageView?
|
||||
|
||||
fileprivate var leftCell: UICollectionViewCell?
|
||||
fileprivate var rightCell: UICollectionViewCell?
|
||||
fileprivate var step: CGFloat = 0
|
||||
|
||||
fileprivate var frontViewFrame = CGRect.zero
|
||||
fileprivate var backViewFrame = CGRect.zero
|
||||
|
||||
init(view: UIView) {
|
||||
self.view = view
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: control
|
||||
|
||||
extension TransitionDriver {
|
||||
|
||||
func pushTransitionAnimationIndex(currentIndex: Int,
|
||||
collecitionView: UICollectionView,
|
||||
backImage: UIImage?,
|
||||
headerHeight: CGFloat,
|
||||
completion: UIView -> Void) {
|
||||
|
||||
guard case let cell as BasePageCollectionCell = collecitionView.cellForItemAtIndexPath(NSIndexPath(forRow: currentIndex, inSection: 0)),
|
||||
let copyView = cell.copyCell() else { return }
|
||||
copyCell = copyView
|
||||
|
||||
// move cells
|
||||
moveCellsCurrentIndex(currentIndex, collectionView: collecitionView)
|
||||
|
||||
currentCell = cell
|
||||
cell.hidden = true
|
||||
|
||||
configurateCell(copyView, backImage: backImage)
|
||||
backImageView = addImageToView(copyView.backContainerView, image: backImage)
|
||||
|
||||
openBackViewConfigureConstraints(copyView, height: headerHeight)
|
||||
openFrontViewConfigureConstraints(copyView, height: headerHeight)
|
||||
|
||||
// corner animation
|
||||
copyView.backContainerView.animationCornerRadius(0, duration: duration)
|
||||
copyView.frontContainerView.animationCornerRadius(0, duration: duration)
|
||||
|
||||
// constraints animation
|
||||
UIView.animateWithDuration(duration, delay: 0, options: .CurveEaseInOut, animations: {
|
||||
self.view.layoutIfNeeded()
|
||||
self.backImageView?.alpha = 1
|
||||
self.copyCell?.shadowView?.alpha = 0
|
||||
copyView.frontContainerView.subviewsForEach { if $0.tag == Constants.HideKey { $0.alpha = 0 } }
|
||||
}, completion: { success in
|
||||
let data = NSKeyedArchiver.archivedDataWithRootObject(copyView.frontContainerView)
|
||||
guard case let headerView as UIView = NSKeyedUnarchiver.unarchiveObjectWithData(data) else {
|
||||
fatalError("must copy")
|
||||
}
|
||||
completion(headerView)
|
||||
})
|
||||
}
|
||||
|
||||
func popTransitionAnimationContantOffset(offset: CGFloat, backImage: UIImage?) {
|
||||
guard let copyCell = self.copyCell else {
|
||||
return
|
||||
|
||||
func pushTransitionAnimationIndex(_ currentIndex: Int,
|
||||
collecitionView: UICollectionView,
|
||||
backImage: UIImage?,
|
||||
headerHeight: CGFloat,
|
||||
insets: CGFloat,
|
||||
completion: @escaping (UIView) -> Void) {
|
||||
|
||||
guard case let cell as BasePageCollectionCell = collecitionView.cellForItem(at: IndexPath(row: currentIndex, section: 0)),
|
||||
let copyView = cell.copyCell() else { return }
|
||||
copyCell = copyView
|
||||
|
||||
// move cells
|
||||
moveCellsCurrentIndex(currentIndex, collectionView: collecitionView)
|
||||
|
||||
currentCell = cell
|
||||
cell.isHidden = true
|
||||
|
||||
configurateCell(copyView, backImage: backImage)
|
||||
backImageView = addImageToView(copyView.backContainerView, image: backImage)
|
||||
|
||||
openBackViewConfigureConstraints(copyView, height: headerHeight, insets: insets)
|
||||
openFrontViewConfigureConstraints(copyView, height: headerHeight, insets: insets)
|
||||
|
||||
// corner animation
|
||||
copyView.backContainerView.animationCornerRadius(0, duration: duration)
|
||||
copyView.frontContainerView.animationCornerRadius(0, duration: duration)
|
||||
copyView.center = view.center
|
||||
|
||||
// constraints animation
|
||||
UIView.animate(withDuration: duration, delay: 0, options: UIViewAnimationOptions(), animations: {
|
||||
self.view.layoutIfNeeded()
|
||||
self.backImageView?.alpha = 1
|
||||
self.copyCell?.shadowView?.alpha = 0
|
||||
copyView.frontContainerView.subviewsForEach { if $0.tag == Constants.HideKey { $0.alpha = 0 } }
|
||||
}, completion: { _ in
|
||||
let data = NSKeyedArchiver.archivedData(withRootObject: copyView.frontContainerView)
|
||||
guard case let headerView as UIView = NSKeyedUnarchiver.unarchiveObject(with: data) else {
|
||||
fatalError("must copy")
|
||||
}
|
||||
completion(headerView)
|
||||
})
|
||||
}
|
||||
|
||||
func popTransitionAnimationContantOffset(_ offset: CGFloat, backImage: UIImage?) {
|
||||
guard let copyCell = self.copyCell else {
|
||||
return
|
||||
}
|
||||
|
||||
backImageView?.image = backImage
|
||||
// configuration start position
|
||||
configureCellBeforeClose(copyCell, offset: offset)
|
||||
|
||||
closeBackViewConfigurationConstraints(copyCell)
|
||||
closeFrontViewConfigurationConstraints(copyCell)
|
||||
|
||||
// corner animation
|
||||
copyCell.backContainerView.animationCornerRadius(copyCell.backContainerView.layer.cornerRadius, duration: duration)
|
||||
copyCell.frontContainerView.animationCornerRadius(copyCell.frontContainerView.layer.cornerRadius, duration: duration)
|
||||
|
||||
UIView.animate(withDuration: duration, delay: 0, options: UIViewAnimationOptions(), animations: {
|
||||
self.rightCell?.center.x -= self.step
|
||||
self.leftCell?.center.x += self.step
|
||||
|
||||
self.view.layoutIfNeeded()
|
||||
self.backImageView?.alpha = 0
|
||||
copyCell.shadowView?.alpha = 1
|
||||
|
||||
copyCell.frontContainerView.subviewsForEach { if $0.tag == Constants.HideKey { $0.alpha = 1 } }
|
||||
}, completion: { _ in
|
||||
self.currentCell?.isHidden = false
|
||||
self.removeCurrentCell()
|
||||
})
|
||||
}
|
||||
|
||||
backImageView?.image = backImage
|
||||
// configuration start position
|
||||
configureCellBeforeClose(copyCell, offset: offset)
|
||||
|
||||
closeBackViewConfigurationConstraints(copyCell)
|
||||
closeFrontViewConfigurationConstraints(copyCell)
|
||||
|
||||
// corner animation
|
||||
copyCell.backContainerView.animationCornerRadius(copyCell.backContainerView.layer.cornerRadius, duration: duration)
|
||||
copyCell.frontContainerView.animationCornerRadius(copyCell.frontContainerView.layer.cornerRadius, duration: duration)
|
||||
|
||||
UIView.animateWithDuration(duration, delay: 0, options: .CurveEaseInOut, animations: {
|
||||
self.rightCell?.center.x -= self.step
|
||||
self.leftCell?.center.x += self.step
|
||||
|
||||
self.view.layoutIfNeeded()
|
||||
self.backImageView?.alpha = 0
|
||||
copyCell.shadowView?.alpha = 1
|
||||
|
||||
copyCell.frontContainerView.subviewsForEach { if $0.tag == Constants.HideKey { $0.alpha = 1 } }
|
||||
}, completion: { success in
|
||||
self.currentCell?.hidden = false
|
||||
self.removeCurrentCell()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
|
||||
extension TransitionDriver {
|
||||
|
||||
private func removeCurrentCell() {
|
||||
if case let currentCell as UIView = self.copyCell {
|
||||
currentCell.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
private func configurateCell(cell: BasePageCollectionCell, backImage: UIImage?) {
|
||||
cell.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(cell)
|
||||
|
||||
// add constraints
|
||||
[(NSLayoutAttribute.Width, cell.bounds.size.width), (NSLayoutAttribute.Height, cell.bounds.size.height)].forEach { info in
|
||||
cell >>>- {
|
||||
$0.attribute = info.0
|
||||
$0.constant = info.1
|
||||
}
|
||||
}
|
||||
|
||||
[NSLayoutAttribute.CenterX, .CenterY].forEach { attribute in
|
||||
(view, cell) >>>- { $0.attribute = attribute }
|
||||
}
|
||||
cell.layoutIfNeeded()
|
||||
}
|
||||
|
||||
private func addImageToView(view: UIView, image: UIImage?) -> UIImageView? {
|
||||
guard let image = image else { return nil }
|
||||
|
||||
let imageView = Init(UIImageView(image: image)) {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.alpha = 0
|
||||
}
|
||||
view.addSubview(imageView)
|
||||
|
||||
// add constraints
|
||||
[NSLayoutAttribute.Left, .Right, .Top, .Bottom].forEach { attribute in
|
||||
(view, imageView) >>>- { $0.attribute = attribute }
|
||||
}
|
||||
imageView.layoutIfNeeded()
|
||||
|
||||
return imageView
|
||||
}
|
||||
|
||||
private func moveCellsCurrentIndex(currentIndex: Int, collectionView: UICollectionView) {
|
||||
self.leftCell = nil
|
||||
self.rightCell = nil
|
||||
|
||||
if let leftCell = collectionView.cellForItemAtIndexPath(NSIndexPath(forRow: currentIndex - 1, inSection: 0)) {
|
||||
let step = leftCell.frame.size.width + (leftCell.frame.origin.x - collectionView.contentOffset.x)
|
||||
UIView.animateWithDuration(0.2, animations: {
|
||||
leftCell.center.x -= step
|
||||
})
|
||||
self.leftCell = leftCell
|
||||
self.step = step
|
||||
fileprivate func removeCurrentCell() {
|
||||
if case let currentCell as UIView = copyCell {
|
||||
currentCell.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
if let rightCell = collectionView.cellForItemAtIndexPath(NSIndexPath(forRow: currentIndex + 1, inSection: 0)) {
|
||||
let step = collectionView.frame.size.width - (rightCell.frame.origin.x - collectionView.contentOffset.x)
|
||||
UIView.animateWithDuration(0.2, animations: {
|
||||
rightCell.center.x += step
|
||||
})
|
||||
self.rightCell = rightCell
|
||||
self.step = step
|
||||
|
||||
fileprivate func configurateCell(_ cell: BasePageCollectionCell, backImage _: UIImage?) {
|
||||
cell.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.addSubview(cell)
|
||||
|
||||
// add constraints
|
||||
[(NSLayoutAttribute.width, cell.bounds.size.width), (NSLayoutAttribute.height, cell.bounds.size.height)].forEach { info in
|
||||
cell >>>- {
|
||||
$0.attribute = info.0
|
||||
$0.constant = info.1
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
[NSLayoutAttribute.centerX, .centerY].forEach { attribute in
|
||||
(view, cell) >>>- {
|
||||
$0.attribute = attribute
|
||||
return
|
||||
}
|
||||
}
|
||||
cell.layoutIfNeeded()
|
||||
}
|
||||
|
||||
fileprivate func addImageToView(_ view: UIView, image: UIImage?) -> UIImageView? {
|
||||
guard let image = image else { return nil }
|
||||
|
||||
let imageView = Init(UIImageView(image: image)) {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.alpha = 0
|
||||
}
|
||||
view.addSubview(imageView)
|
||||
|
||||
// add constraints
|
||||
[NSLayoutAttribute.left, .right, .top, .bottom].forEach { attribute in
|
||||
(view, imageView) >>>- {
|
||||
$0.attribute = attribute
|
||||
return
|
||||
}
|
||||
}
|
||||
imageView.layoutIfNeeded()
|
||||
|
||||
return imageView
|
||||
}
|
||||
|
||||
fileprivate func moveCellsCurrentIndex(_ currentIndex: Int, collectionView: UICollectionView) {
|
||||
leftCell = nil
|
||||
rightCell = nil
|
||||
|
||||
if let leftCell = collectionView.cellForItem(at: IndexPath(row: currentIndex - 1, section: 0)) {
|
||||
let step = leftCell.frame.size.width + (leftCell.frame.origin.x - collectionView.contentOffset.x)
|
||||
UIView.animate(withDuration: 0.2, animations: {
|
||||
leftCell.center.x -= step
|
||||
})
|
||||
self.leftCell = leftCell
|
||||
self.step = step
|
||||
}
|
||||
|
||||
if let rightCell = collectionView.cellForItem(at: IndexPath(row: currentIndex + 1, section: 0)) {
|
||||
let step = collectionView.frame.size.width - (rightCell.frame.origin.x - collectionView.contentOffset.x)
|
||||
UIView.animate(withDuration: 0.2, animations: {
|
||||
rightCell.center.x += step
|
||||
})
|
||||
self.rightCell = rightCell
|
||||
self.step = step
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: animations
|
||||
|
||||
extension TransitionDriver {
|
||||
|
||||
private func openFrontViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat) {
|
||||
|
||||
if let heightConstraint = cell.frontContainerView.getConstraint(.Height) {
|
||||
frontViewFrame.size.height = heightConstraint.constant
|
||||
heightConstraint.constant = height
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.frontContainerView.getConstraint(.Width) {
|
||||
frontViewFrame.size.width = widthConstraint.constant
|
||||
widthConstraint.constant = view.bounds.size.width
|
||||
}
|
||||
|
||||
frontViewFrame.origin.y = cell.frontConstraintY.constant
|
||||
cell.frontConstraintY.constant = -view.bounds.size.height / 2 + height / 2
|
||||
}
|
||||
|
||||
private func openBackViewConfigureConstraints(cell: BasePageCollectionCell, height: CGFloat) {
|
||||
|
||||
if let heightConstraint = cell.backContainerView.getConstraint(.Height) {
|
||||
backViewFrame.size.height = heightConstraint.constant
|
||||
heightConstraint.constant = view.bounds.size.height - height
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.backContainerView.getConstraint(.Width) {
|
||||
backViewFrame.size.width = widthConstraint.constant
|
||||
widthConstraint.constant = view.bounds.size.width
|
||||
}
|
||||
|
||||
backViewFrame.origin.y = cell.backConstraintY.constant
|
||||
cell.backConstraintY.constant = view.bounds.size.height / 2 - (view.bounds.size.height - 236) / 2
|
||||
}
|
||||
|
||||
private func closeBackViewConfigurationConstraints(cell: BasePageCollectionCell?) {
|
||||
guard let cell = cell else { return }
|
||||
|
||||
let heightConstraint = cell.backContainerView.getConstraint(.Height)
|
||||
heightConstraint?.constant = backViewFrame.size.height
|
||||
|
||||
let widthConstraint = cell.backContainerView.getConstraint(.Width)
|
||||
widthConstraint?.constant = backViewFrame.size.width
|
||||
fileprivate func openFrontViewConfigureConstraints(_ cell: BasePageCollectionCell, height: CGFloat, insets: CGFloat) {
|
||||
|
||||
cell.backConstraintY.constant = backViewFrame.origin.y
|
||||
}
|
||||
|
||||
private func closeFrontViewConfigurationConstraints(cell: BasePageCollectionCell?) {
|
||||
guard let cell = cell else { return }
|
||||
|
||||
if let heightConstraint = cell.frontContainerView.getConstraint(.Height) {
|
||||
heightConstraint.constant = frontViewFrame.size.height
|
||||
if let heightConstraint = cell.frontContainerView.getConstraint(.height) {
|
||||
frontViewFrame.size.height = heightConstraint.constant
|
||||
heightConstraint.constant = height
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.frontContainerView.getConstraint(.width) {
|
||||
frontViewFrame.size.width = widthConstraint.constant
|
||||
widthConstraint.constant = view.bounds.size.width
|
||||
}
|
||||
|
||||
frontViewFrame.origin.y = cell.frontConstraintY.constant
|
||||
cell.frontConstraintY.constant = -view.bounds.size.height / 2 + height / 2 + insets
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.frontContainerView.getConstraint(.Width) {
|
||||
widthConstraint.constant = frontViewFrame.size.width
|
||||
|
||||
fileprivate func openBackViewConfigureConstraints(_ cell: BasePageCollectionCell, height: CGFloat, insets: CGFloat) {
|
||||
|
||||
if let heightConstraint = cell.backContainerView.getConstraint(.height) {
|
||||
backViewFrame.size.height = heightConstraint.constant
|
||||
heightConstraint.constant = view.bounds.size.height - height
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.backContainerView.getConstraint(.width) {
|
||||
backViewFrame.size.width = widthConstraint.constant
|
||||
widthConstraint.constant = view.bounds.size.width
|
||||
}
|
||||
|
||||
backViewFrame.origin.y = cell.backConstraintY.constant
|
||||
cell.backConstraintY.constant = view.bounds.size.height / 2 - (view.bounds.size.height - height) / 2 + insets
|
||||
}
|
||||
|
||||
cell.frontConstraintY.constant = frontViewFrame.origin.y
|
||||
}
|
||||
|
||||
private func configureCellBeforeClose(cell: BasePageCollectionCell, offset: CGFloat) {
|
||||
cell.frontConstraintY.constant -= offset
|
||||
cell.backConstraintY.constant -= offset / 2.0
|
||||
if let heightConstraint = cell.backContainerView.getConstraint(.Height) {
|
||||
heightConstraint.constant += offset
|
||||
|
||||
fileprivate func closeBackViewConfigurationConstraints(_ cell: BasePageCollectionCell?) {
|
||||
guard let cell = cell else { return }
|
||||
|
||||
let heightConstraint = cell.backContainerView.getConstraint(.height)
|
||||
heightConstraint?.constant = backViewFrame.size.height
|
||||
|
||||
let widthConstraint = cell.backContainerView.getConstraint(.width)
|
||||
widthConstraint?.constant = backViewFrame.size.width
|
||||
|
||||
cell.backConstraintY.constant = backViewFrame.origin.y
|
||||
}
|
||||
|
||||
fileprivate func closeFrontViewConfigurationConstraints(_ cell: BasePageCollectionCell?) {
|
||||
guard let cell = cell else { return }
|
||||
|
||||
if let heightConstraint = cell.frontContainerView.getConstraint(.height) {
|
||||
heightConstraint.constant = frontViewFrame.size.height
|
||||
}
|
||||
|
||||
if let widthConstraint = cell.frontContainerView.getConstraint(.width) {
|
||||
widthConstraint.constant = frontViewFrame.size.width
|
||||
}
|
||||
|
||||
cell.frontConstraintY.constant = frontViewFrame.origin.y
|
||||
}
|
||||
|
||||
fileprivate func configureCellBeforeClose(_ cell: BasePageCollectionCell, offset: CGFloat) {
|
||||
cell.frontConstraintY.constant -= offset
|
||||
cell.backConstraintY.constant -= offset / 2.0
|
||||
if let heightConstraint = cell.backContainerView.getConstraint(.height) {
|
||||
heightConstraint.constant += offset
|
||||
}
|
||||
cell.contentView.layoutIfNeeded()
|
||||
}
|
||||
cell.contentView.layoutIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,12 +1,11 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'expanding-collection'
|
||||
s.version = '0.0.1'
|
||||
s.version = '1.1.5'
|
||||
s.summary = 'Transition animtion from CollectionView to TableView'
|
||||
s.license = 'MIT'
|
||||
s.homepage = 'https://github.com/Ramotion/expanding-collection'
|
||||
s.author = { 'Juri Vasylenko' => 'juri.v@ramotion.com' }
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.ios.deployment_target = '9.0'
|
||||
s.source = { :git => 'https://github.com/Ramotion/expanding-collection.git', :tag => s.version.to_s }
|
||||
s.source_files = 'Source/**/*.swift'
|
||||
s.requires_arc = true
|
||||
end
|
||||
|
||||
|
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 |