From fa5e32ba3f1354e5c7e213bd3f1267061a24b0bc Mon Sep 17 00:00:00 2001 From: Daniel Alvarez Date: Mon, 2 Oct 2023 14:15:59 +0200 Subject: [PATCH] Remove assertion in MMMStackContainer We used to assert in 'addSubview()', however system sometimes can install temporary subviews, like when editing text fields on iOS 17. --- MMMCommonUI.podspec | 2 +- Sources/MMMCommonUIObjC/MMMLayout.m | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/MMMCommonUI.podspec b/MMMCommonUI.podspec index 43afede..b6c4997 100644 --- a/MMMCommonUI.podspec +++ b/MMMCommonUI.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.name = "MMMCommonUI" - s.version = "3.9.0" + s.version = "3.9.1" s.summary = "Small UI-related pieces reused in many components from MMMTemple" s.description = "#{s.summary}." s.homepage = "https://github.com/mediamonks/#{s.name}" diff --git a/Sources/MMMCommonUIObjC/MMMLayout.m b/Sources/MMMCommonUIObjC/MMMLayout.m index 6e2a0d8..b2554f7 100644 --- a/Sources/MMMCommonUIObjC/MMMLayout.m +++ b/Sources/MMMCommonUIObjC/MMMLayout.m @@ -990,9 +990,8 @@ - (id)initWithDirection:(MMMLayoutDirection)direction return self; } -- (void)addSubview:(UIView *)view { - NSAssert(NO, @"%@ allows to set subviews via %s only", self.class, sel_getName(@selector(setSubviews:))); -} +// We used to assert in 'addSubview()' here, however system sometimes can install temporary subviews, like +// when editing text fields on iOS 17. /** Potentially can replace this with a predicate, so different spacings can be set between items of different kinds. */ - (CGFloat)spacingBetweenItem:(UIView *)item1 andItem:(UIView *)item2 {