Skip to content

Commit

Permalink
Minor formatting and documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarm committed Apr 26, 2017
1 parent 60c1422 commit 20f67f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Example/BetterSegmentedControl/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ViewController: UIViewController {

// Control 5: Adding custom subview to Indicator
let indicatorControl = BetterSegmentedControl(
frame: CGRect(x: 0.0, y: 360.0, width: view.bounds.width, height: 50.0),
frame: CGRect(x: 0.0, y: 375.0, width: view.bounds.width, height: 50.0),
titles: ["Hello", "Goodbye"],
index: 0,
backgroundColor: .lightGray,
Expand Down
2 changes: 0 additions & 2 deletions Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ class BetterSegmentedControlSpec: QuickSpec {
})
it("successfully adds the subview", closure: {
expect(underlineView.superview).toNot(beNil())
// TODO: @testable import doesn't seem to correctly import private members of a pod
// expect(underlineView.superview).to(be(control.indicatorView))
})
}
}
Expand Down
6 changes: 3 additions & 3 deletions Pod/Classes/BetterSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ import UIKit
titleLabels.forEach { $0.layer.borderWidth = titleBorderWidth }
}
}
/// The titles's number of lines
/// The titles' number of lines
public var titleNumberOfLines: Int = 1 {
didSet {
titleLabels.forEach { $0.numberOfLines = titleNumberOfLines }
Expand Down Expand Up @@ -318,9 +318,9 @@ import UIKit
// MARK: Indicator View Customization

/**
Adds the given given view to the indicator view (the view which slides across segments to indicate the current selection)
Adds the passed view as a subview to the indicator view

- parameter view: The view to add to the indicator
- parameter view: The view to be added to the indicator view

- note: The added view must be able to layout & size itself and will not be autoresized.
*/
Expand Down

0 comments on commit 20f67f0

Please sign in to comment.