Skip to content

Commit

Permalink
Merge pull request #9 from daisuke310vvv/fix-readme
Browse files Browse the repository at this point in the history
fix readme.md
  • Loading branch information
daisuke310vvv committed Feb 20, 2016
2 parents d4b5d09 + 77e977e commit 0a2acfa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@
ReferencedContainer = "container:PopupController.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9D468A1F1C63601D00AF56C7"
BuildableName = "PopupControllerUITests.xctest"
BlueprintName = "PopupControllerUITests"
ReferencedContainer = "container:PopupController.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ Future

## Usage

Before use, Every ViewController which is added on the PopupController must conform to *PopupContentViewController* protocol.
Before use,
Every ViewController which is added on the PopupController must conform to *PopupContentViewController* protocol.

```swift
class AnyPopupViewController: UIViewController, PopupContentViewController {

// Do something...

priavte var popupSize: CGSize // define the size for showing popup view size.

// PopupContentViewController Protocol
func sizeForPopup(popupController: PopupController, size: CGSize, showingKeyboard: Bool) -> CGSize {
return CGSizeMake(300, 400) // size for a view
return popupSize
}
}
```
Expand All @@ -46,14 +52,26 @@ Then, show popup
let anyPopupViewController = AnyPopupViewController()
let popupController = PopupController.create(self)
popupController.presentPoopupController(anyPopupViewController, completion: nil)
```
```

With some custom.

```swift
let popupController = PopupController.create(self)
popupController.animation = .FadeIn
popupController.layout = .Top
popupController.backgroundStyle = .Blur(style: .Light)
popupController.presentPoopupController(childViewController, completion: nil)
```

## Customization

```swift
public var layout: PopupLayout // default is .Center, [.Top/.Center/.Bottom]
public var animation: PopupAnimation // default is .SlideUp, [.Slideup/.FadeIn]
public var backgroundStyle: PopupBackgroundStyle // default is .BlackFilter(alpha: 0.4) [BlackFilter(alpha: CGFloat)/Blur]
public var scrollable: Bool // default is true
public var movesAlongWithKeyboard: Bool // default is true
```

## License
Expand Down

0 comments on commit 0a2acfa

Please sign in to comment.