-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from atone/develop
Develop
- Loading branch information
Showing
23 changed files
with
726 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/JTSAnimatedGIFUtility.m
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/JTSImageViewController.h
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/UIApplication+JTSImageViewController.h
100755 → 100644
Empty file.
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/UIApplication+JTSImageViewController.m
100755 → 100644
Empty file.
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/UIImage+JTSImageEffects.h
100755 → 100644
Empty file.
Empty file modified
0
ZSMTH/Frameworks/JTSImageViewController/UIImage+JTSImageEffects.m
100755 → 100644
Empty file.
File renamed without changes.
File renamed without changes.
87 changes: 87 additions & 0 deletions
87
ZSMTH/Frameworks/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// The MIT License (MIT) | ||
// | ||
// Copyright (c) 2015-2016 forkingdog ( https://github.com/forkingdog ) | ||
// | ||
// 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. | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface UITableView (FDTemplateLayoutCell) | ||
|
||
/// Returns height of cell of type specifed by a reuse identifier and configured | ||
/// by the configuration block. | ||
/// | ||
/// The cell would be layed out on a fixed-width, vertically expanding basis with | ||
/// respect to its dynamic content, using auto layout. Thus, it is imperative that | ||
/// the cell was set up to be self-satisfied, i.e. its content always determines | ||
/// its height given the width is equal to the tableview's. | ||
/// | ||
/// @param identifier A string identifier for retrieving and maintaining template | ||
/// cells with system's "-dequeueReusableCellWithIdentifier:" call. | ||
/// @param configuration An optional block for configuring and providing content | ||
/// to the template cell. The configuration should be minimal for scrolling | ||
/// performance yet sufficient for calculating cell's height. | ||
/// | ||
- (CGFloat)fd_heightForCellWithIdentifier:(NSString *)identifier configuration:(void (^)(id cell))configuration; | ||
|
||
/// This method does what "-fd_heightForCellWithIdentifier:configuration" does, and | ||
/// calculated height will be cached by its index path, returns a cached height | ||
/// when needed. Therefore lots of extra height calculations could be saved. | ||
/// | ||
/// No need to worry about invalidating cached heights when data source changes, it | ||
/// will be done automatically when you call "-reloadData" or any method that triggers | ||
/// UITableView's reloading. | ||
/// | ||
/// @param indexPath where this cell's height cache belongs. | ||
/// | ||
- (CGFloat)fd_heightForCellWithIdentifier:(NSString *)identifier cacheByIndexPath:(NSIndexPath *)indexPath configuration:(void (^)(id cell))configuration; | ||
|
||
/// Helps to debug or inspect what is this "FDTemplateLayoutCell" extention doing, | ||
/// turning on to print logs when "creating", "calculating", "precaching" or "hitting cache". | ||
/// | ||
/// Default to "NO", log by "NSLog". | ||
/// | ||
@property (nonatomic, assign) BOOL fd_debugLogEnabled; | ||
|
||
@end | ||
|
||
@interface UITableViewCell (FDTemplateLayoutCell) | ||
|
||
/// Indicate this is a template layout cell for calculation only. | ||
/// You may need this when there are non-UI side effects when configure a cell. | ||
/// Like: | ||
/// - (void)configureCell:(FooCell *)cell atIndexPath:(NSIndexPath *)indexPath { | ||
/// cell.entity = [self entityAtIndexPath:indexPath]; | ||
/// if (!cell.fd_isTemplateLayoutCell) { | ||
/// [self notifySomething]; // non-UI side effects | ||
/// } | ||
/// } | ||
/// | ||
@property (nonatomic, assign) BOOL fd_isTemplateLayoutCell; | ||
|
||
/// Enable to enforce this template layout cell to use "frame layout" rather than "auto layout", | ||
/// and will ask cell's height by calling "-sizeThatFits:", so you must override this method. | ||
/// Note: | ||
/// If no layout constraints have been added to cell's content view, it will automatically | ||
/// switch to "frame layout" mode. Use this property only when you want to manually control | ||
/// this template layout cell's height calculation mode. Default to NO. | ||
/// | ||
@property (nonatomic, assign) BOOL fd_enforceFrameLayout; | ||
|
||
@end |
Oops, something went wrong.