Skip to content

Commit

Permalink
Merge pull request #2 from rickerbh/master
Browse files Browse the repository at this point in the history
Allow change of arrow image after creation of menu
  • Loading branch information
PhamBaTho committed Jul 21, 2015
2 parents f9656bd + 95b8b7a commit 53fbfb6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1 deletion.
Binary file modified Source/BTNavigationDropdownMenu.bundle/arrow_down_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Source/BTNavigationDropdownMenu.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Source/BTNavigationDropdownMenu.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Source/BTNavigationDropdownMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class BTNavigationDropdownMenu: UIView {
public var arrowImage: UIImage! {
didSet {
self.configuration.arrowImage = arrowImage
self.menuArrow.image = self.configuration.arrowImage
}
}

Expand Down Expand Up @@ -173,7 +174,7 @@ public class BTNavigationDropdownMenu: UIView {
override public func layoutSubviews() {
self.menuTitle.sizeToFit()
self.menuTitle.center = CGPointMake(self.frame.size.width/2, self.frame.size.height/2)
self.menuArrow.frame = CGRectMake(0, 0, 12, 7)
self.menuArrow.sizeToFit()
self.menuArrow.center = CGPointMake(CGRectGetMaxX(self.menuTitle.frame) + self.configuration.arrowPadding, self.frame.size.height/2)
}

Expand Down

0 comments on commit 53fbfb6

Please sign in to comment.