Skip to content

Commit

Permalink
Added options for button titles
Browse files Browse the repository at this point in the history
  • Loading branch information
JaNd3r authored Sep 1, 2017
1 parent 179cc1c commit 5c09952
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,17 @@ tOptions[CIRCLE_MENU_TAP_MODE] = true as AnyObject
tOptions[CIRCLE_MENU_LINE_MODE] = false as AnyObject
tOptions[CIRCLE_MENU_BUTTON_TINT] = false as AnyObject
tOptions[CIRCLE_MENU_BACKGROUND_BLUR] = false as AnyObject
tOptions[CIRCLE_MENU_BUTTON_TITLE_VISIBLE] = true as AnyObject
tOptions[CIRCLE_MENU_BUTTON_TITLE_FONT_SIZE] = 11.0 as AnyObject
```
* Dispay the menu as follows (don't forget to add the `CKCircleMenuDelegate' as protocol).
* Dispay the menu as follows (don't forget to add the `CKCircleMenuDelegate` as protocol).
```swift
self.circleMenuView = CKCircleMenuView(atOrigin: tPoint, usingOptions: tOptions, withImageArray: self.circleMenuImageArray)
self.view.addSubview(self.circleMenuView!)
self.circleMenuView!.delegate = self
self.circleMenuView!.openMenu()
```
* Optionally you can pass an array of titles (strings) as the fourth parameter. The titles will be dispayed below the corresponding icon (same index in array). See the demo app for an example on how to use titles. Note, that these titles may only consist of a maximum of about 8 characters, as there is not much space within the button's bounds.
* Implement the methods of the `CKCircleMenuDelegate` protocol to react to menu events.
```swift
// MARK: Circle Menu Delegate
Expand Down

0 comments on commit 5c09952

Please sign in to comment.