mirror of
https://github.com/wu736139669/Ash_AWord.git
synced 2026-08-05 05:55:19 +00:00
new
This commit is contained in:
-16
@@ -259,22 +259,6 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Note/NoteTableViewCell.m"
|
||||
timestampString = "449635232.241651"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "74"
|
||||
endingLineNumber = "74"
|
||||
landmarkName = "+heightWith:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
@property (weak, nonatomic) IBOutlet UIButton *shareBtn;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentHeight;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *imageBtnClick;
|
||||
|
||||
|
||||
- (IBAction)goodBtnClick:(id)sender;
|
||||
|
||||
@@ -110,6 +110,12 @@
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kWq-q0-MPl">
|
||||
<rect key="frame" x="8" y="69" width="304" height="112"/>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="DAR-mT-RbS" secondAttribute="bottom" constant="-3" id="4TG-zs-Q0N"/>
|
||||
@@ -119,6 +125,7 @@
|
||||
<constraint firstItem="kO5-Uc-AhU" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="Dxu-6O-Q88"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="A54-Sv-7Vo" secondAttribute="bottom" constant="-3" id="GQb-si-pt6"/>
|
||||
<constraint firstItem="Zq3-YP-dwB" firstAttribute="leading" secondItem="j8x-8X-1uX" secondAttribute="trailing" constant="8" id="Jr5-MH-iSW"/>
|
||||
<constraint firstItem="kWq-q0-MPl" firstAttribute="centerY" secondItem="p9l-PS-2tC" secondAttribute="centerY" id="Jwe-wJ-Fh7"/>
|
||||
<constraint firstItem="A54-Sv-7Vo" firstAttribute="leading" secondItem="xeW-Yw-x4V" secondAttribute="trailing" constant="8" id="PDA-wH-xbu"/>
|
||||
<constraint firstItem="j8x-8X-1uX" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="PiZ-qa-B5O"/>
|
||||
<constraint firstItem="2Rh-LI-LRT" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="UIC-fn-AiY"/>
|
||||
@@ -126,9 +133,12 @@
|
||||
<constraint firstItem="DAR-mT-RbS" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="XpE-yY-Jq9"/>
|
||||
<constraint firstItem="Zq3-YP-dwB" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="2" id="Yz4-qJ-JUc"/>
|
||||
<constraint firstItem="xeW-Yw-x4V" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="YzT-Tf-o6a"/>
|
||||
<constraint firstItem="kWq-q0-MPl" firstAttribute="height" secondItem="p9l-PS-2tC" secondAttribute="height" id="Zgr-1g-SIR"/>
|
||||
<constraint firstItem="kWq-q0-MPl" firstAttribute="centerX" secondItem="p9l-PS-2tC" secondAttribute="centerX" id="b9R-Qn-j79"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="2Rh-LI-LRT" secondAttribute="trailing" constant="4" id="ble-e8-Va3"/>
|
||||
<constraint firstItem="p9l-PS-2tC" firstAttribute="top" secondItem="2Rh-LI-LRT" secondAttribute="bottom" constant="8" id="dUD-nk-z5D"/>
|
||||
<constraint firstItem="kO5-Uc-AhU" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="4" id="fRB-tZ-fsb"/>
|
||||
<constraint firstItem="kWq-q0-MPl" firstAttribute="width" secondItem="p9l-PS-2tC" secondAttribute="width" id="g4i-cb-kjD"/>
|
||||
<constraint firstItem="p9l-PS-2tC" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="hsb-xb-XRe"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="p9l-PS-2tC" secondAttribute="bottom" constant="30" id="hwb-4s-rTG"/>
|
||||
<constraint firstItem="j8x-8X-1uX" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="kHO-Ea-fBs"/>
|
||||
@@ -147,6 +157,7 @@
|
||||
<outlet property="contentImgView" destination="p9l-PS-2tC" id="gjB-iJ-KAX"/>
|
||||
<outlet property="contentTextView" destination="2Rh-LI-LRT" id="w5j-ni-kam"/>
|
||||
<outlet property="goodBtn" destination="xeW-Yw-x4V" id="0LE-Gu-6C1"/>
|
||||
<outlet property="imageBtnClick" destination="kWq-q0-MPl" id="Gga-2K-Ksh"/>
|
||||
<outlet property="shareBtn" destination="DAR-mT-RbS" id="fGW-sh-aV3"/>
|
||||
<outlet property="timeLabel" destination="kO5-Uc-AhU" id="jky-Wu-oYB"/>
|
||||
<outlet property="userName" destination="Zq3-YP-dwB" id="Ggo-yh-zdb"/>
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# License
|
||||
|
||||
## MIT License
|
||||
|
||||
Copyright (c) 2013 Daniel Amitay (http://danielamitay.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
## DACircularProgress
|
||||
|
||||
`DACircularProgress` is a `UIView` subclass with circular `UIProgressView` properties.
|
||||
|
||||
It was originally built to be an imitation of Facebook's photo progress indicator.
|
||||
|
||||
View the included example project for a demonstration.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
To use `DACircularProgress`:
|
||||
|
||||
- Copy over the `DACircularProgress` folder to your project folder.
|
||||
- Make sure that your project includes `<QuartzCore.framework>`.
|
||||
- `#import "DACircularProgressView.h"`
|
||||
|
||||
### Example Code
|
||||
|
||||
```objective-c
|
||||
|
||||
self.progressView = [[DACircularProgressView alloc] initWithFrame:CGRectMake(140.0f, 30.0f, 40.0f, 40.0f)];
|
||||
self.progressView.roundedCorners = YES;
|
||||
self.progressView.trackTintColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.progressView];
|
||||
```
|
||||
|
||||
- You can also use Interface Builder by adding a `UIView` element and setting its class to `DACircularProgress`
|
||||
|
||||
## Notes
|
||||
|
||||
### Compatibility
|
||||
|
||||
iOS5.0+
|
||||
|
||||
### Automatic Reference Counting (ARC) support
|
||||
|
||||
`DACircularProgress` was made with ARC enabled by default.
|
||||
|
||||
## Contact
|
||||
|
||||
- [Personal website](http://danielamitay.com)
|
||||
- [GitHub](http://github.com/danielamitay)
|
||||
- [Twitter](http://twitter.com/danielamitay)
|
||||
- [LinkedIn](http://www.linkedin.com/in/danielamitay)
|
||||
- [Email](hello@danielamitay.com)
|
||||
|
||||
If you use/enjoy `DACircularProgress`, let me know!
|
||||
|
||||
## Credits
|
||||
|
||||
`DACircularProgress` is brought to you by [Daniel Amitay](http://www.amitay.us) and [contributors to the project](https://github.com/danielamitay/DACircularProgress/contributors). A special thanks to [Cédric Luthi](https://github.com/0xced) for a significant amount of changes. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/danielamitay/DACircularProgress/issues/new).
|
||||
|
||||
## License
|
||||
|
||||
### MIT License
|
||||
|
||||
Copyright (c) 2013 Daniel Amitay (http://danielamitay.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../DACircularProgress/DACircularProgress/DACircularProgressView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefresh.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshComponent.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshConst.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshGifFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshGifHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshLegendFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshLegendHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIScrollView+MJExtension.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIScrollView+MJRefresh.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIView+MJExtension.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWCaptionView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWCommon.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWGridCell.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWGridViewController.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhoto.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowserPrivate.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoProtocol.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWTapDetectingImageView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWTapDetectingView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/NSIndexPath+PSTCollectionViewAdditions.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewCell.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewCommon.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewController.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewData.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewFlowLayout.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewItemKey.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewLayout+Internals.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewLayout.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewUpdateItem.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutInfo.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutItem.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutRow.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutSection.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../DACircularProgress/DACircularProgress/DACircularProgressView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefresh.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshComponent.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshConst.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshGifFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshGifHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshLegendFooter.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshLegendHeader.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIScrollView+MJExtension.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIScrollView+MJRefresh.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MJRefresh/MJRefreshExample/MJRefreshExample/MJRefresh/UIView+MJExtension.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWCaptionView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWCommon.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWGridCell.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWGridViewController.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhoto.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowserPrivate.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoProtocol.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWTapDetectingImageView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWTapDetectingView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/NSIndexPath+PSTCollectionViewAdditions.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionView.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewCell.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewCommon.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewController.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewData.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewFlowLayout.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewItemKey.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewLayout+Internals.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewLayout.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTCollectionViewUpdateItem.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutInfo.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutItem.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutRow.h
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../PSTCollectionView/PSTCollectionView/PSTGridLayoutSection.h
|
||||
Generated
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
+206
@@ -0,0 +1,206 @@
|
||||
## MJRefresh
|
||||
The easiest way to use pull-to-refresh
|
||||
|
||||
## 支持哪些控件的刷新
|
||||
* `UIScrollView`、`UITableView`、`UICollectionView`、`UIWebView`
|
||||
|
||||
## 如何使用MJRefresh
|
||||
* cocoapods导入:`pod 'MJRefresh'`
|
||||
* 手动导入:
|
||||
* 将`MJRefreshExample/MJRefreshExample/MJRefresh`文件夹中的所有文件拽入项目中
|
||||
* 导入主头文件:`#import "MJRefresh.h"`
|
||||
```objc
|
||||
MJRefresh.bundle
|
||||
MJRefresh.h
|
||||
MJRefreshComponent.h MJRefreshComponent.m
|
||||
MJRefreshConst.h MJRefreshConst.m
|
||||
MJRefreshFooter.h MJRefreshFooter.m
|
||||
MJRefreshGifFooter.h MJRefreshGifFooter.m
|
||||
MJRefreshGifHeader.h MJRefreshGifHeader.m
|
||||
MJRefreshHeader.h MJRefreshHeader.m
|
||||
MJRefreshLegendFooter.h MJRefreshLegendFooter.m
|
||||
MJRefreshLegendHeader.h MJRefreshLegendHeader.m
|
||||
UIScrollView+MJExtension.h UIScrollView+MJExtension.m
|
||||
UIScrollView+MJRefresh.h UIScrollView+MJRefresh.m
|
||||
UIView+MJExtension.h UIView+MJExtension.m
|
||||
```
|
||||
|
||||
## 具体用法
|
||||
```objc
|
||||
* 由于这个框架的功能较多,就不写具体文字描述其用法
|
||||
* 大家可以直接参考示例中的MJTableViewController和MJCollectionViewController,更为直观快速
|
||||
```
|
||||
|
||||
## 下拉刷新01-传统
|
||||

|
||||
```objc
|
||||
// 添加传统的下拉刷新
|
||||
[self.tableView addLegendHeaderWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
}];
|
||||
或
|
||||
// 添加传统的下拉刷新
|
||||
// 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadNewData方法)
|
||||
[self.tableView addLegendHeaderWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
|
||||
|
||||
// 马上进入刷新状态
|
||||
[self.tableView.header beginRefreshing];
|
||||
```
|
||||
|
||||
## 下拉刷新02-动画图片
|
||||

|
||||
```objc
|
||||
// 添加动画图片的下拉刷新
|
||||
// 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadNewData方法)
|
||||
[self.tableView addGifHeaderWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
|
||||
// 设置普通状态的动画图片
|
||||
[self.tableView.gifHeader setImages:idleImages forState:MJRefreshHeaderStateIdle];
|
||||
// 设置即将刷新状态的动画图片(一松开就会刷新的状态)
|
||||
[self.tableView.gifHeader setImages:pullingImages forState:MJRefreshHeaderStatePulling];
|
||||
// 设置正在刷新状态的动画图片
|
||||
[self.tableView.gifHeader setImages:refreshingImages forState:MJRefreshHeaderStateRefreshing];
|
||||
```
|
||||
|
||||
## 下拉刷新03-隐藏时间
|
||||

|
||||
```objc
|
||||
// 隐藏时间
|
||||
self.tableView.header.updatedTimeHidden = YES;
|
||||
```
|
||||
|
||||
## 下拉刷新04-隐藏状态和时间01
|
||||

|
||||
```objc
|
||||
// 隐藏时间
|
||||
self.tableView.header.updatedTimeHidden = YES;
|
||||
// 隐藏状态
|
||||
self.tableView.header.stateHidden = YES;
|
||||
```
|
||||
|
||||
## 下拉刷新05-隐藏状态和时间02
|
||||

|
||||
|
||||
## 下拉刷新06-自定义文字
|
||||

|
||||
```objc
|
||||
// 设置文字
|
||||
[self.tableView.header setTitle:@"Pull down to refresh" forState:MJRefreshHeaderStateIdle];
|
||||
[self.tableView.header setTitle:@"Release to refresh" forState:MJRefreshHeaderStatePulling];
|
||||
[self.tableView.header setTitle:@"Loading ..." forState:MJRefreshHeaderStateRefreshing];
|
||||
|
||||
// 设置字体
|
||||
self.tableView.header.font = [UIFont systemFontOfSize:15];
|
||||
|
||||
// 设置颜色
|
||||
self.tableView.header.textColor = [UIColor redColor];
|
||||
```
|
||||
|
||||
## 上拉刷新01-传统
|
||||

|
||||
```objc
|
||||
// 添加传统的上拉刷新
|
||||
[self.tableView addLegendFooterWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
}];
|
||||
或
|
||||
// 添加传统的上拉刷新
|
||||
// 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadMoreData方法)
|
||||
[self.tableView addLegendFooterWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
|
||||
```
|
||||
|
||||
## 上拉刷新02-动画图片
|
||||

|
||||
```objc
|
||||
// 添加动画图片的上拉刷新
|
||||
// 设置回调(一旦进入刷新状态,就调用target的action,也就是调用self的loadMoreData方法)
|
||||
[self.tableView addGifFooterWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
|
||||
|
||||
// 设置正在刷新状态的动画图片
|
||||
self.tableView.gifFooter.refreshingImages = refreshingImages;
|
||||
```
|
||||
|
||||
## 上拉刷新03-隐藏状态01
|
||||

|
||||
```objc
|
||||
// 隐藏状态
|
||||
self.tableView.footer.stateHidden = YES;
|
||||
```
|
||||
|
||||
## 上拉刷新04-隐藏状态02
|
||||

|
||||
|
||||
## 上拉刷新05-全部加载完毕
|
||||

|
||||
```objc
|
||||
// 变为没有更多数据的状态
|
||||
[self.tableView.footer noticeNoMoreData];
|
||||
```
|
||||
|
||||
## 上拉刷新06-禁止自动加载
|
||||

|
||||
```objc
|
||||
// 禁止自动加载
|
||||
self.tableView.footer.automaticallyRefresh = NO;
|
||||
```
|
||||
|
||||
## 上拉刷新07-自定义文字
|
||||

|
||||
```objc
|
||||
// 设置文字
|
||||
[self.tableView.footer setTitle:@"Click or drag up to refresh" forState:MJRefreshFooterStateIdle];
|
||||
[self.tableView.footer setTitle:@"Loading more ..." forState:MJRefreshFooterStateRefreshing];
|
||||
[self.tableView.footer setTitle:@"No more data" forState:MJRefreshFooterStateNoMoreData];
|
||||
|
||||
// 设置字体
|
||||
self.tableView.footer.font = [UIFont systemFontOfSize:17];
|
||||
|
||||
// 设置颜色
|
||||
self.tableView.footer.textColor = [UIColor blueColor];
|
||||
```
|
||||
|
||||
## 上拉刷新08-加载后隐藏
|
||||

|
||||
```objc
|
||||
// 隐藏当前的上拉刷新控件
|
||||
self.tableView.footer.hidden = YES;
|
||||
```
|
||||
|
||||
## UICollectionView01-上下拉刷新
|
||||

|
||||
```objc
|
||||
// 添加传统的下拉刷新
|
||||
[self.collectionView addLegendHeaderWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
}];
|
||||
// 添加传统的上拉刷新
|
||||
[self.collectionView addLegendFooterWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
}];
|
||||
```
|
||||
|
||||
## UIWebView01-下拉刷新
|
||||

|
||||
```objc
|
||||
// 添加下拉刷新控件
|
||||
[self.webView.scrollView addLegendHeaderWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
}];
|
||||
```
|
||||
|
||||
## 提醒
|
||||
* 本框架纯ARC,兼容的系统>=iOS6.0、iPhone\iPad横竖屏
|
||||
|
||||
## 期待
|
||||
* 如果在使用过程中遇到BUG,希望你能Issues我,谢谢(或者尝试下载最新的框架代码看看BUG修复没有)
|
||||
* 如果在使用过程中发现功能不够用,希望你能Issues我,我非常想为这个框架增加更多好用的功能,谢谢
|
||||
* 如果你想为MJRefresh输出代码,请拼命Pull Requests我
|
||||
* 一起携手打造天朝乃至世界最好用的刷新框架,做天朝程序员的骄傲
|
||||
* 如果你开发的应用中用到了MJRefresh,希望你能到[CocoaControls](https://www.cocoacontrols.com/controls/mjrefresh)添加你应用的iTunes路径,我将会安装使用你的应用,并且根据众多应用的使用情况,对MJRefresh进行一个更好的设计和完善,提供更多好用的功能,谢谢
|
||||
* 步骤01(微信是举个例子,百度“你的应用名称 itunes”)
|
||||

|
||||
* 步骤02
|
||||

|
||||
* 步骤03
|
||||

|
||||
* 步骤04
|
||||

|
||||
Generated
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2010 Michael Waterfall <michaelwaterfall@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
+223
@@ -0,0 +1,223 @@
|
||||
# MWPhotoBrowser
|
||||
|
||||
[](https://flattr.com/submit/auto?user_id=mwaterfall&url=https://github.com/mwaterfall/MWPhotoBrowser&title=MWPhotoBrowser&language=&tags=github&category=software)
|
||||
|
||||
## A simple iOS photo browser with optional grid view, captions and selections.
|
||||
|
||||
MWPhotoBrowser can display one or more images by providing either `UIImage` objects, or URLs to files, web images or library assets. The photo browser handles the downloading and caching of photos from the web seamlessly. Photos can be zoomed and panned, and optional (customisable) captions can be displayed.
|
||||
|
||||
The browser can also be used to allow the user to select one or more photos using either the grid or main image view.
|
||||
|
||||
[![Alt][screenshot1_thumb]][screenshot1] [![Alt][screenshot2_thumb]][screenshot2] [![Alt][screenshot3_thumb]][screenshot3] [![Alt][screenshot4_thumb]][screenshot4] [![Alt][screenshot5_thumb]][screenshot5] [![Alt][screenshot6_thumb]][screenshot6]
|
||||
|
||||
[screenshot1_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser1t.png
|
||||
[screenshot1]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser1.png
|
||||
[screenshot2_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser2t.png
|
||||
[screenshot2]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser2.png
|
||||
[screenshot3_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser3t.png
|
||||
[screenshot3]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser3.png
|
||||
[screenshot4_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser4t.png
|
||||
[screenshot4]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser4.png
|
||||
[screenshot5_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser5t.png
|
||||
[screenshot5]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser5.png
|
||||
[screenshot6_thumb]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser6t.png
|
||||
[screenshot6]: https://raw.github.com/mwaterfall/MWPhotoBrowser/master/Preview/MWPhotoBrowser6.png
|
||||
|
||||
Works on iOS 5.1.1+. All strings are localisable so they can be used in apps that support multiple languages.
|
||||
|
||||
## Usage
|
||||
|
||||
MWPhotoBrowser is designed to be presented within a navigation controller. Simply set the delegate (which must conform to `MWPhotoBrowserDelegate`) and implement the 2 required delegate methods to provide the photo browser with the data in the form of `MWPhoto` objects. You can create an `MWPhoto` object by providing a `UIImage` object, or a URL containing the path to a file, an image online or an asset from the asset library.
|
||||
|
||||
`MWPhoto` objects handle caching, file management, downloading of web images, and various optimisations for you. If however you would like to use your own data model to represent photos you can simply ensure your model conforms to the `MWPhoto` protocol. You can then handle the management of caching, downloads, etc, yourself. More information on this can be found in `MWPhotoProtocol.h`.
|
||||
|
||||
See the code snippet below for an example of how to implement the photo browser. There is also a simple demo app within the project.
|
||||
|
||||
```obj-c
|
||||
// Create array of MWPhoto objects
|
||||
self.photos = [NSMutableArray array];
|
||||
[photos addObject:[MWPhoto photoWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]]]];
|
||||
[photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b.jpg"]]];
|
||||
[photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b.jpg"]]];
|
||||
|
||||
// Create browser (must be done each time photo browser is
|
||||
// displayed. Photo browser objects cannot be re-used)
|
||||
MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithDelegate:self];
|
||||
|
||||
// Set options
|
||||
browser.displayActionButton = YES; // Show action button to allow sharing, copying, etc (defaults to YES)
|
||||
browser.displayNavArrows = NO; // Whether to display left and right nav arrows on toolbar (defaults to NO)
|
||||
browser.displaySelectionButtons = NO; // Whether selection buttons are shown on each image (defaults to NO)
|
||||
browser.zoomPhotosToFill = YES; // Images that almost fill the screen will be initially zoomed to fill (defaults to YES)
|
||||
browser.alwaysShowControls = NO; // Allows to control whether the bars and controls are always visible or whether they fade away to show the photo full (defaults to NO)
|
||||
browser.enableGrid = YES; // Whether to allow the viewing of all the photo thumbnails on a grid (defaults to YES)
|
||||
browser.startOnGrid = NO; // Whether to start on the grid of thumbnails instead of the first photo (defaults to NO)
|
||||
browser.wantsFullScreenLayout = YES; // iOS 5 & 6 only: Decide if you want the photo browser full screen, i.e. whether the status bar is affected (defaults to YES)
|
||||
|
||||
// Optionally set the current visible photo before displaying
|
||||
[browser setCurrentPhotoIndex:1];
|
||||
|
||||
// Present
|
||||
[self.navigationController pushViewController:browser animated:YES];
|
||||
|
||||
// Manipulate
|
||||
[browser showNextPhotoAnimated:YES];
|
||||
[browser showPreviousPhotoAnimated:YES];
|
||||
[browser setCurrentPhotoIndex:10];
|
||||
```
|
||||
|
||||
Then respond to the required delegate methods:
|
||||
|
||||
```obj-c
|
||||
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser {
|
||||
return self.photos.count;
|
||||
}
|
||||
|
||||
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
|
||||
if (index < self.photos.count)
|
||||
return [self.photos objectAtIndex:index];
|
||||
return nil;
|
||||
}
|
||||
```
|
||||
|
||||
You can present the browser modally simply by wrapping it in a new navigation controller and presenting that. The demo app allows you to toggle between the two presentation types.
|
||||
|
||||
If using iOS 5 or 6 and you don't want to view the photo browser full screen (for example if you are using view controller containment) then set the photo browser's `wantsFullScreenLayout` property to `NO`. This will mean the status bar will not be affected by the photo browser.
|
||||
|
||||
|
||||
### Grid
|
||||
|
||||
In order to properly show the grid of thumbnails, you must ensure the property `enableGrid` is set to `YES`, and implement the following delegate method:
|
||||
|
||||
```obj-c
|
||||
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser thumbPhotoAtIndex:(NSUInteger)index;
|
||||
```
|
||||
|
||||
The photo browser can also start on the grid by enabling the `startOnGrid` property.
|
||||
|
||||
|
||||
### Actions
|
||||
|
||||
By default, if the action button is visible then the image (and caption if it exists) are sent to a UIActivityViewController. On iOS 5, a custom action sheet appears allowing them to copy or email the photo.
|
||||
|
||||
You can provide a custom action by implementing the following delegate method:
|
||||
|
||||
```obj-c
|
||||
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser actionButtonPressedForPhotoAtIndex:(NSUInteger)index {
|
||||
// Do your thing!
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Photo Captions
|
||||
|
||||
Photo captions can be displayed simply by setting the `caption` property on specific photos:
|
||||
|
||||
```obj-c
|
||||
MWPhoto *photo = [MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b.jpg"]];
|
||||
photo.caption = @"Campervan";
|
||||
```
|
||||
|
||||
No caption will be displayed if the caption property is not set.
|
||||
|
||||
|
||||
#### Custom Captions
|
||||
|
||||
By default, the caption is a simple black transparent view with a label displaying the photo's caption in white. If you want to implement your own caption view, follow these steps:
|
||||
|
||||
1. Optionally use a subclass of `MWPhoto` for your photos so you can store more data than a simple caption string.
|
||||
2. Subclass `MWCaptionView` and override `-setupCaption` and `-sizeThatFits:` (and any other UIView methods you see fit) to layout your own view and set it's size. More information on this can be found in `MWCaptionView.h`
|
||||
3. Implement the `-photoBrowser:captionViewForPhotoAtIndex:` MWPhotoBrowser delegate method (shown below).
|
||||
|
||||
Example delegate method for custom caption view:
|
||||
|
||||
```obj-c
|
||||
- (MWCaptionView *)photoBrowser:(MWPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index {
|
||||
MWPhoto *photo = [self.photos objectAtIndex:index];
|
||||
MyMWCaptionViewSubclass *captionView = [[MyMWCaptionViewSubclass alloc] initWithPhoto:photo];
|
||||
return captionView;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### Selections
|
||||
|
||||
The photo browser can display check boxes allowing the user to select one or more of the photos. To use this feature, simply enable the `displaySelectionButtons` property, and implement the following delegate methods:
|
||||
|
||||
```obj-c
|
||||
- (BOOL)photoBrowser:(MWPhotoBrowser *)photoBrowser isPhotoSelectedAtIndex:(NSUInteger)index {
|
||||
return [[_selections objectAtIndex:index] boolValue];
|
||||
}
|
||||
|
||||
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index selectedChanged:(BOOL)selected {
|
||||
[_selections replaceObjectAtIndex:index withObject:[NSNumber numberWithBool:selected]];
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Adding to your project
|
||||
|
||||
### Method 1: Use CocoaPods
|
||||
|
||||
[CocoaPods](http://cocoapods.org) is great. If you are using CocoaPods ([and here's how to get started](http://guides.cocoapods.org/using/using-cocoapods.html)), simply add `pod 'MWPhotoBrowser'` to your podfile and run `pod install`. You're good to go! Here's an example podfile:
|
||||
|
||||
```
|
||||
platform :ios, '7'
|
||||
pod 'MWPhotoBrowser'
|
||||
```
|
||||
|
||||
|
||||
### Method 2: Static Library
|
||||
|
||||
1. Get the latest source from GitHub by either [downloading as a zip file](https://github.com/mwaterfall/MWPhotoBrowser/zipball/master) or by cloning the repository at `git://github.com/mwaterfall/MWPhotoBrowser.git` and store the code wherever you wish.
|
||||
2. Right-click on the your project in the navigator, click "Add Files to 'Your Project'", and browse to and select "MWPhotoBrowser.xcodeproj"
|
||||
3. In your project's target settings, go to "Build Phases" -> "Link Binary With Libraries" and add `libMWPhotoBrowser.a`.
|
||||
4. Still in "Build Phases", drop down "Copy Bundle Resources" and drag the file `MWPhotoBrowser.bundle` from the MWPhotoBrowser project into that list. This ensures your project will include the required graphics for the photo browser to work correctly.
|
||||
5. In the target, select the "Build Settings" tab and ensure "Always Search User Paths" is set to YES, and "User Header Search Paths" is set to the recursive absolute or relative path that points to a directory under which the MWPhotoBrowser code is stored. In the file layout of the MWPhotoBrowser project, a simple ../** works as the demo project folder and MWPhotoBrowser project folder are adjacent to one another. Please let me know if you encounter any issue with this.
|
||||
6. Under "Build Phases / Link Binary With Libraries" add `MessageUI.framework`, `QuartzCore.framework`, `AssetsLibrary.framework` and `ImageIO.framework` to "Linked Frameworks and Libraries".
|
||||
|
||||
You should now be able to include `MWPhotoBrowser.h` into your project and start using it.
|
||||
|
||||
Setting these things up in Xcode can be a bit tricky so if you run into any problems you may wish to read through a few bits of information:
|
||||
|
||||
- [Developing a Static Library and Incorporating It in Your Application](http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/910-A-Developing_a_Static_Library_and_Incorporating_It_in_Your_Application/archiving_an_application_that_uses_a_static_library.html)
|
||||
- [Using Open Source Static Libraries in Xcode 4](http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/#using_a_static_library)
|
||||
- [How to embed static library into Xcode 4 project](https://docs.google.com/document/pub?id=14XR5zcZb2Kz2s6A4AbzB00NLkrW9bWxMMprVsUao-hY)
|
||||
|
||||
### Method 3: Including Source Directly Into Your Project
|
||||
|
||||
Another method is to simply add the files to your Xcode project, copying them to your project's directory if required. Ensure that all the code within `MWPhotoBrowser/Classes`, `MWPhotoBrowser/Libraries` and the `MWPhotoBrowser.bundle` is included in your project.
|
||||
|
||||
|
||||
## Notes and Accreditation
|
||||
|
||||
MWPhotoBrowser very gratefully makes use of these other fantastic open source projects:
|
||||
|
||||
- [SDWebImage](https://github.com/rs/SDWebImage) by Olivier Poitrey — Used to handle downloading and decompressing of photos from the web.
|
||||
- [MBProgressHUD](https://github.com/jdg/MBProgressHUD) by Jonathan George — Used to display activity notifications.
|
||||
- [DACircularProgress](https://github.com/danielamitay/DACircularProgress) by Daniel Amitay — Used to display image download progress.
|
||||
|
||||
Demo photos kindly provided by Oliver Waters (<http://twitter.com/oliverwaters>).
|
||||
|
||||
|
||||
## Licence
|
||||
|
||||
Copyright (c) 2010 Michael Waterfall <michaelwaterfall@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2012-2013 Peter Steinberger <steipete@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
+57
@@ -0,0 +1,57 @@
|
||||
PSTCollectionView
|
||||
=================
|
||||
|
||||
UPDATE: I'm no longer using PSTCollectionView in any project, but will still accept pull requests for improvements.
|
||||
|
||||
Open Source, 100% API compatible replacement of UICollectionView for iOS4.3+
|
||||
|
||||
**You want to use UICollectionView, but still need to support older versions of iOS? Then you're gonna love this project.**
|
||||
Originally I wrote it for [PSPDFKit](http://PSPDFKit.com), my iOS PDF framework that supports text selection and annotations, but this project seemed way too useful for others to keep it for myself :)
|
||||
|
||||
**If you want to have PSTCollectionView on iOS4.3/5.x and UICollectionView on iOS6, use PSUICollectionView (basically add PS on any UICollectionView* class to get auto-support for older iOS versions)**
|
||||
If you always want to use PSTCollectionView, use PSTCollectionView as class names. (replace the UI with PST)
|
||||
|
||||
## Current State
|
||||
|
||||
Most features work, including the flow layout with fixed or dynamic cell sizes and supplementary views. If you're not doing something fancy, it should just work.
|
||||
PSTCollectionView is also internally designed very closely to UICollectionView and thus a great study if you're wondering how UICollectionView works. See [HowTo](HowTo.md) for helpful details.
|
||||
|
||||
## How can I help?
|
||||
|
||||
The best way is if you're already using UICollectionView somewhere. Add PSTCollectionView and try it on iOS4/5. Check if everything works, fix bugs until the result matches 1:1 with iOS6. You can also just pick an issue fron the Issue Tracker and start working there.
|
||||
|
||||
Or start playing around with one of the WWDC examples and try to make them work with PSTCollectionView. Most of them already do, but just not as perfect.
|
||||
|
||||
You could also write a Pinterest-style layout manager. Can't be that hard.
|
||||
|
||||
## Animations
|
||||
|
||||
Thanks to Sergey Gavrilyuk ([@octogavrix](https://twitter.com/octogavrix)), animations are supported. It's not perfect yet (see LineExample), but it's a great start.
|
||||
|
||||
## ARC
|
||||
|
||||
PSTCollectionView works with Xcode 4.5.2+ and ARC.
|
||||
|
||||
## Dependencies
|
||||
|
||||
PSTCollectionView needs the QuartzCore.framework.
|
||||
|
||||
## Interoperability
|
||||
|
||||
Another goal (at least super useful for debugging) is interoperability between UI/PST classes:
|
||||
|
||||
``` objective-c
|
||||
UICollectionViewFlowLayout *flowLayout = [UICollectionViewFlowLayout new];
|
||||
PSTCollectionView *collectionView = [[PSTCollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:(PSTCollectionViewFlowLayout *)flowLayout];
|
||||
```
|
||||
|
||||
(*) Note that for some methods we can't use the _ underscore variants or we risk to get a false-positive on private API use. I've added some runtime hacks to dynamcially add block forwarders for those cases (mainly for UI/PST interoperability)
|
||||
|
||||
## Creator
|
||||
|
||||
[Peter Steinberger](http://petersteinberger.com) ([@steipete](https://twitter.com/steipete))
|
||||
and lots of others! See [Contributors](https://github.com/steipete/PSTCollectionView/graphs/contributors) for a graph. Thanks everyone!
|
||||
|
||||
## License
|
||||
|
||||
PSTCollectionView is available under the MIT license. See the LICENSE file for more info.
|
||||
Reference in New Issue
Block a user