diff --git a/Library/AppearanceSelectionTableCell.m b/Library/AppearanceSelectionTableCell.m index 3281239..8f1071c 100644 --- a/Library/AppearanceSelectionTableCell.m +++ b/Library/AppearanceSelectionTableCell.m @@ -108,8 +108,8 @@ - (AppearanceSelectionTableCell *)initWithStyle:(UITableViewCellStyle)style reus self.containerStackView.translatesAutoresizingMaskIntoConstraints = false; for (NSDictionary *option in self.options) { - AppearanceTypeStackView *stackView = [[AppearanceTypeStackView alloc] initWithType:[self.options indexOfObject:option] - forController:self + AppearanceTypeStackView *stackView = [[AppearanceTypeStackView alloc] initWithType:[self.options indexOfObject:option] + forController:self withImage:[UIImage imageNamed:option[@"image"] inBundle:prefsBundle compatibleWithTraitCollection:NULL] andText:option[@"text"] andSpecifier:specifier]; @@ -140,4 +140,10 @@ - (void)updateForType:(int)type { } } -@end \ No newline at end of file +- (void)layoutSubviews { + [super layoutSubviews]; + + if (self.containerStackView.spacing != (self.bounds.size.width - (60 * [self.options count])) / ([self.options count] + 1)) self.containerStackView.spacing = (self.bounds.size.width - (60 * [self.options count])) / ([self.options count] + 1); +} + +@end diff --git a/control b/control index bc62ae7..75550fb 100644 --- a/control +++ b/control @@ -1,6 +1,6 @@ Package: me.conorthedev.libappearancecell Name: libappearancecell -Version: 1.0.2 +Version: 1.0.3 Architecture: iphoneos-arm Description: A library for that allows developers to use an iOS 13-style appearance selector in their Preferences. Maintainer: ConorTheDev