Skip to content

Commit

Permalink
Merge pull request #5 from robertherdzik/update-tiles-behaviour
Browse files Browse the repository at this point in the history
Tiles behaviour layout changed
  • Loading branch information
robertherdzik authored Sep 29, 2016
2 parents bf1b28d + 6bfb7a7 commit 52e8854
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 24 deletions.
Binary file modified BlogPostScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Example/RHPreviewCellExample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ platform :ios, '8.0'
use_frameworks!

target 'RHPreviewCellExample' do
pod 'RHPreviewCell'
#pod 'RHPreviewCell'
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

let mainVC = ViewController(withMock: RHMockCellsModel())
mainVC.title = "RHPreviewCell"

let navigationController = UINavigationController(rootViewController: mainVC)
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ extension ViewController: UITableViewDataSource {
cell.delegate = self
cell.dataSource = self
cell.textLabel?.text = mockModel.cells[indexPath.row].title
cell.textLabel?.font = UIFont(name: "Didot", size: 20)

return cell
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class RHPreviewTableViewCellTilesAnimator: RHPreviewTableViewCellTilesAnimationP
UIView.animateWithDuration(0.5,
delay: 0,
usingSpringWithDamping: 0.4,
initialSpringVelocity: 0.2,
initialSpringVelocity: 0.9,
options: UIViewAnimationOptions.CurveEaseInOut,
animations: {
let scale = CGFloat(0.8)
let scale = CGFloat(0.89)
tile.transform = CGAffineTransformMakeScale(scale, scale)
}, completion: nil)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ private extension RHPreviewTilesContainerView {
}

func layoutTiles() {
let horizontalSpacing = CGFloat(1)
let tileOffset = CGFloat(0)
var prevTileMaxX = tileOffset
let horizontalSpacing = CGFloat(2)
let tileOffset = CGFloat(-4)
var prevTileMaxX = horizontalSpacing
for tile in tiles {
let tileBorderSize = bounds.height + tileOffset
let frame = CGRect(x: prevTileMaxX, y: -tileOffset/2, width: tileBorderSize, height: tileBorderSize)
Expand Down
Binary file modified ReadmeAssets/first_video.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ReadmeAssets/second_video.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 52e8854

Please sign in to comment.