Skip to content

Commit

Permalink
Fixed issue of extra left margin in first row.
Browse files Browse the repository at this point in the history
  • Loading branch information
khawars committed Jul 16, 2015
1 parent d7892e2 commit c888384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions KSTokenView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "KSTokenView"
s.version = "1.2.8.2"
s.version = "1.2.8.3"
s.summary = "An iOS control for displaying multiple selections as tokens."
s.description = <<-DESC
A KSTokenView is a control that displays a collection of tokens in a an editable UITextField and sends messages to delegate object. It can be used to gather small amounts of text from user and perform search operation. User can choose multiple search results, which are displayed as token in UITextField.
Expand All @@ -25,7 +25,7 @@ Pod::Spec.new do |s|


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source = { :git => "https://github.com/khawars/KSTokenView.git", :tag => "1.2.8.2" }
s.source = { :git => "https://github.com/khawars/KSTokenView.git", :tag => "1.2.8.3" }

s.source_files = "KSTokenView/*.swift"
s.requires_arc = true
Expand Down
2 changes: 1 addition & 1 deletion KSTokenView/KSTokenField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class KSTokenField: UITextField {
let rightMargin = _rightViewRect().width
let tokenHeight = _font!.lineHeight + _paddingY!;

var tokenPosition = CGPoint(x: _marginX!*2, y: _marginY!)
var tokenPosition = CGPoint(x: _marginX!, y: _marginY!)

for token: KSToken in tokens {
let width = KSUtils.getRect(token.title, width: bounds.size.width, font: _font!).size.width + ceil(_paddingX!*2+1)
Expand Down

0 comments on commit c888384

Please sign in to comment.