lganti
November 21, 2019, 5:12am
1
How do I go about testing the performance using measure
or alike of various IBDesignable
designed to accomplish the same task?
customUILabel vs. UILablelExtension
I am currently changing the class of the label for every run and testing via
import XCTest
class ALUIPerformanceTests: XCTestCase {
let app = XCUIApplication()
override func setUp() {
continueAfterFailure = false
app.launch()
}
func testPerformanceMeasureMetrics() {
guard app.otherElements["welcome_view"].exists else { return }
measure {
let welcomeDescriptionLabel = app.staticTexts["welcome_desc"]
XCTAssertTrue(welcomeDescriptionLabel.exists)
}
}
}
But the above with one case doesn’t help me much as it is 20% better during few runs and 35% worse during others . . .
@lganti Do you still have issues with this?
lganti
January 12, 2020, 5:42am
3
Not really, thanks for checking! : )
Hi @lganti ,
Do you create custom components? This was a great craze that started with Xcode 6 when they were introduced, however it is not used as much unless you create custom components that other users can customize using the inspector in storyboards.
cheers,
lganti
January 14, 2020, 10:35am
5
It was for localization with XIBs
@IBDesignable for localisation? You want to visually preview the strings?
You might want to consider autolayout to adapt for short or longer strings, I guess if this resolves your issue, then good.
cheers,
1 Like
lganti
January 14, 2020, 10:42am
7
My bad - I didn’t word it properly. It was associated with two different methods taken to add the ability to add localized text with in a view’s XIB for instance . . .
system
Closed
May 5, 2020, 9:12pm
8
This topic was automatically closed after 166 days. New replies are no longer allowed.