Skip to content

Commit

Permalink
Updated the content insets
Browse files Browse the repository at this point in the history
  • Loading branch information
twof committed May 29, 2018
1 parent 5588c48 commit 8b36719
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Example/XMSegmentedControl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -514,7 +514,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -29,10 +39,15 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
}
2 changes: 1 addition & 1 deletion Pod/Classes/XMSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ open class XMSegmentedControl: UIView {

switch contentType {
case .icon:
tab.imageEdgeInsets = UIEdgeInsets(top: 12, left: 12, bottom: 12, right: 12)
tab.imageEdgeInsets = UIEdgeInsets(top: 8, left: 12, bottom: 8, right: 12)
tab.imageView?.contentMode = UIViewContentMode.scaleAspectFit
tab.tintColor = i == selectedSegment ? highlightTint : tint
tab.setImage(segmentIcon[i], for: UIControlState())
Expand Down

0 comments on commit 8b36719

Please sign in to comment.