Solved

A/B testing by visual experiment creator affects to other UIs?

  • 14 May 2019
  • 2 replies
  • 162 views

Badge

When I use the UI's visual experiment creator for creating A/B testing on an iOS app, A/B test itself is working right, but it affects to other UIs as well unexpectedly.

For example, I edit a text (UIButton > Edit text and style) for a button on screen A, then another button on screen B text is gone. Button itself is displayed but its text is not displayed while there is an expected text configured when I select that button (i.e. UIButton > Edit text and style) in the visual experiment creator. I don't set any A/B test for this button on screen B.


I have no idea what is happening. What can I do to avoid this?

SDK version is: mixpanel-swift v2.5.8


icon

Best answer by toru 14 May 2019, 07:20

View original

2 replies

Badge

Tried the latest SDK version 2.6.2 and got the same result.


Badge

Figured out only the cause. If I use custom subview of UIButton and override layoutSubviews() function, then this behavior happens. That is:

  • Button on screen A: UIButton
  • Button on screen B: CustomButton

CustomButton looks like (it does more but just simplified):

class CustomButton: UIButton {
override func layoutSubviews() {
super.layoutSubviews()
}
}

Just deleting this overriding, then a button on screen B displays the text correctly.


Reply