Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #24

Merged
merged 1 commit into from
Oct 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ With BrickKit, you can create complex and responsive layouts in a simple way. It

## Define your layouts using objects that describe the high-level behavior

```
```swift

let section = BrickSection(bricks: [
LabelBrick(width: .Ratio(ratio: 1), text: "BRICK 1"),
Expand All @@ -44,7 +44,7 @@ self.setSection(section)
## Define heights based on rules


```
```swift

// Calculate height using auto-layout
LabelBrick(height: .Auto(estimate: .Fixed(size: 50)), text: "BRICK"),
Expand Down Expand Up @@ -76,7 +76,7 @@ let height: BrickDimension =

## Complex layouts, using Sections in Sections

```
```swift

let section = BrickSection(bricks: [
LabelBrick(width: .Ratio(ratio: 0.5), text: "BRICK"),
Expand Down Expand Up @@ -114,7 +114,7 @@ self.setSection(section)

## Create your own reuseable Bricks!

```
```swift

registerBrickClass(NiblessBrick.self)

Expand All @@ -134,7 +134,7 @@ setSection(section)

## Use different scroll directions within bricks

```
```swift
self.registerBrickClass(CollectionBrick.self)
self.registerBrickClass(LabelBrick.self)

Expand Down Expand Up @@ -169,15 +169,15 @@ let section = BrickSection(bricks: [
])
setSection(section)

```
```swift

![horizontal](Docs/Gif/horizontal.gif)

## Dynamic Image Heights

Images are automatically resized based on its content

```
```swift

registerBrickClass(ImageBrick.self)
registerBrickClass(LabelBrick.self)
Expand All @@ -200,7 +200,7 @@ self.setSection(section)
![images](Docs/Gif/images.gif)

## Advanced Sticky
```
```swift
...
behavior = StickyLayoutBehavior(dataSource: self)
...
Expand All @@ -214,7 +214,7 @@ func stickyLayoutBehavior(stickyLayoutBehavior: StickyLayoutBehavior, shouldStic

## Coverflow

```
```swift

layout.scrollDirection = .Horizontal

Expand All @@ -228,7 +228,7 @@ self.brickCollectionView.layout.behaviors.insert(CoverFlowLayoutBehavior(minimum

## Appear Behavior (none, bottom, top)

```
```swift
layout.appearBehavior = BrickAppearTopBehavior() // Insert from the top
layout.appearBehavior = BrickAppearBottomBehavior() // Insert from the bottom

Expand All @@ -237,7 +237,7 @@ layout.appearBehavior = BrickAppearBottomBehavior() // Insert from the bottom

## Spotlight

```
```swift
...
behavior = SpotlightLayoutBehavior(dataSource: self)
...
Expand Down Expand Up @@ -268,7 +268,7 @@ func spotlightLayoutBehavior(behavior: SpotlightLayoutBehavior, smallHeightForIt

## Installation Instructions
Installation is simple. You just need Cocoapods and it is a matter of adding this to your podfile:
```
```ruby
pod 'BrickKit'
```

Expand Down