|
@@ -116,18 +116,18 @@ public class ComponentTabs: ComponentBaseXibView {
|
|
|
ComponentLibrary.shared.configTabsComponent(properties: itemProperty)
|
|
|
|
|
|
if property?.tabsType == .underline_Fill {
|
|
|
- item.frame = CGRectMake(itemXValue, 0, CGRectGetWidth(frame)/CGFloat(propertyArr.count), frame.size.height)
|
|
|
+ item.frame = CGRectMake(itemXValue, CGRectGetHeight(bounds)/2 - 16, CGRectGetWidth(frame)/CGFloat(propertyArr.count), 32)
|
|
|
} else if property?.tabsType == .onlyText {
|
|
|
- item.frame = CGRectMake(itemXValue, 0, itemProperty.propertyInfo.viewWidth, frame.size.height)
|
|
|
+ item.frame = CGRectMake(itemXValue, CGRectGetHeight(bounds)/2 - 16, itemProperty.propertyInfo.viewWidth, 32)
|
|
|
} else if property?.tabsType == .fill {
|
|
|
- item.frame = CGRectMake(itemXValue, 0, itemProperty.propertyInfo.viewWidth, frame.size.height)
|
|
|
+ item.frame = CGRectMake(itemXValue, CGRectGetHeight(bounds)/2 - 16, itemProperty.propertyInfo.viewWidth, 32)
|
|
|
} else if property?.tabsType == .underline_Center {
|
|
|
- item.frame = CGRectMake(itemXValue, 0, itemProperty.propertyInfo.viewWidth, frame.size.height)
|
|
|
+ item.frame = CGRectMake(itemXValue, CGRectGetHeight(bounds)/2 - 16, itemProperty.propertyInfo.viewWidth, 32)
|
|
|
}
|
|
|
item.properties = itemProperty
|
|
|
item.tagIndex = i
|
|
|
|
|
|
- item.autoresizingMask = [.maxXMargin, .minYMargin, .maxYMargin, .height]
|
|
|
+ item.autoresizingMask = [.maxXMargin, .minYMargin, .maxYMargin]
|
|
|
item.setTarget(self, action: #selector(cSelectorItemClicked(_:)))
|
|
|
contendBox.contentView?.addSubview(item)
|
|
|
|