Skip to content

Commit

Permalink
Allow user to set custom margin in multiselectable scroll view.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartłomiej Semańczyk committed Jul 6, 2016
1 parent 38eacf7 commit 9639aa6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BSSelectableView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = 'BSSelectableView'
s.version = '1.0.8'
s.version = '1.0.9'
s.summary = 'Easily manage your token along with your single or multiply select view.'
s.description = "Looking for simple Swift library to manage multiply or single selection? This one is for you:)"

Expand Down
6 changes: 3 additions & 3 deletions BSSelectableView/Classes/BSScrollTokenView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class BSScrollTokenView: UIScrollView {

if count == 0 {

let placeholderLabel = UILabel(frame: CGRect(x: CGFloat(BSSelectableView.leftPaddingForPlaceholderText), y: 0, width: frame.size.width, height: dataSource?.lineHeight() ?? 30))
let placeholderLabel = UILabel(frame: CGRect(x: CGFloat(BSSelectableView.leftPaddingForPlaceholderText), y: 0, width: frame.size.width, height: dataSource?.lineHeightForToken() ?? 30))
placeholderLabel.text = dataSource?.textForPlaceholder()
placeholderLabel.textColor = BSSelectableView.textColorForPlaceholderText
placeholderLabel.font = BSSelectableView.fontForPlaceholderText
Expand All @@ -80,7 +80,7 @@ public class BSScrollTokenView: UIScrollView {
private func enumerateItemRectsUsingBlock(block: (CGRect) -> Void) {

var x: CGFloat = 0
let margin = dataSource?.tokenMargin?() ?? 0
let margin = dataSource?.marginForToken() ?? 0

for token in tokenViews {

Expand Down Expand Up @@ -111,7 +111,7 @@ public class BSScrollTokenView: UIScrollView {

override public func intrinsicContentSize() -> CGSize {

let lineHeight = dataSource?.lineHeight() ?? 30
let lineHeight = dataSource?.lineHeightForToken() ?? 30

if tokenViews.isEmpty {

Expand Down
Binary file not shown.

0 comments on commit 9639aa6

Please sign in to comment.