Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sgr-ksmt committed Apr 30, 2017
1 parent b282c56 commit a6b0a09
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Binary file added Documents/img6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Alertift.alert(title: "Alertift", message: "Alertift is swifty, modern, and awes
- Method chain
- UITextField support
- iPad support(Action Sheet, popover)
- Can change title/message/button text/ background color. (**without** private APIs.)

## Examples

Expand Down Expand Up @@ -115,6 +116,44 @@ Alertift.actionSheet(message: "Which food do you like?")

![img5](Documents/img5.png)

### Change colors

```swift
Alertift.alert(title: "Red color title", message: "Message text color is blue")
.titleTextColor(.red)
.messageTextColor(.blue)
.backgroundColor(.lightGray)
.buttonTextColor(.orange)
.action(.default("Orange"))
.show()
```

![img6](Documents/img6.png)

```swift
public func backgroundColor(_ color: UIColor?) -> Self
public func buttonTextColor(_ color: UIColor?) -> Self
public func titleTextColor(_ color: UIColor?) -> Self
public func messageTextColor(_ color: UIColor?) -> Self
```

#### Always change color

If you want to change Alertift's alert(action sheet) color always,
set color to `static var`.

```swift
Alertift.Alert.titleTextColor = .red
Alertift.ActionSheet.backgroundColor = .gray
```

```swift
static var backgroundColor: UIColor? { get set }
static var buttonTextColor: UIColor? { get set }
static var titleTextColor: UIColor? { get set }
static var messageTextColor: UIColor? { get set }
```


## Requirements
- iOS 9.0+
Expand Down

0 comments on commit a6b0a09

Please sign in to comment.