Skip to content

Commit

Permalink
adding actions to a category doc
Browse files Browse the repository at this point in the history
  • Loading branch information
d7laungani authored Dec 26, 2016
1 parent 5c095ae commit 068d24b
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ It also includes all the new features, including inserting attachments and chang
- [Notification that repeats from one Date to another with a time interval period](#notification-that-repeats-from-one-date-to-another-with-a-time-interval-period)
- [Modifying elements of the notification](#modifying-elements-of-the-notification)
- [Location Based Notification](#location-based-notification)
- [Action Buttons](#adding-action-buttons-to-a-notification)
5. [Contribute](#contribute)

## Features

- [x] Easily Repeat Notifications
- [x] Location Based Notifications
- [ ] Category Actions
- [x] Category Action buttons
- [ ] Queue to enforce 64 notification limit

## Requirements

Expand Down Expand Up @@ -94,8 +96,7 @@ This is useful to setup notifications to repeat every specific time interval for
```swift

let scheduler = DLNotificationScheduler()
scheduler.cancelAlllNotifications()


// This notification repeats every 15 seconds from a time period starting from 15 seconds from the current time till 5 minutes from the current time

scheduler.repeatsFromToDate(identifier: "First Notification", alertTitle: "Multiple Notifcations", alertBody: "Progress", fromDate: Date().addingTimeInterval(15), toDate: Date().addingTimeInterval(300) , interval: 15 )
Expand Down Expand Up @@ -140,6 +141,23 @@ let scheduler = DLNotificationScheduler()
scheduler.scheduleNotification(notification: locationNotification)
```

### Adding action buttons to a notification

```swift

let scheduler = DLNotificationScheduler()

let standingCategory = DLCategory(categoryIdentifier: "standingReminder")

standingCategory.addActionButton(identifier: "willStand", title: "Ok, got it")
standingCategory.addActionButton(identifier: "willNotStand", title: "Cannot")

scheduler.scheduleCategories(categories: [standingCategory])

```



## Contribute

We would love for you to contribute to **DLLocalNotifications**, check the ``LICENSE`` file for more info.
Expand Down

0 comments on commit 068d24b

Please sign in to comment.