Hey, this is the voice translator app!
UIView's animation: snapshot testing / Instruments Profiling
I have an UIView hierarchy, when some views are semi-transparent, and there're views which can be animated simultaneously.
The hierarchy is quite complex and what's worse, managed from different places.
There's a bug which can be reduced to the following: we animate UIView' background color from `rgba(0,0,255,1)` to `rgba(0,0,255,0)` for 200ms, and instead of fading green frames, sometimes a reddish one appears (most probably it's an underlaying view, or an underlaying view of an underlaying view).
Do you know how to debug such stuff automatically?
I can make screen recording, disable/enable some views (but the bug tends to disappear when the code changed).
https://blog.logrocket.com/how-browser-rendering-works-behind-the-scenes-6782b0e8fb10/ https://habr.com/ru/post/320430/
html file -> parsed into DOM
css file -> parsed into CSSOM
DOM + CSSOM = Render Tree
if an element has display: none
in CSS, it doesn't appear in Render Tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// TestAnimationRecording | |
#import "ViewController.h" | |
static int anim_dur = 10; | |
@interface ViewController () | |
{ |
find . -iname *.h -o -iname *.cpp | xargs clang-format -i --dry-run
Override the status bar appearance:
$ xcrun simctl status_bar F433A439-5E1E-4AAD-BF54-A1B3D661D891 override --time 10:00 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100 --operatorName 'Notificare'
- Add (auto-generated) bridging header
ProductName-Bridging-Header.h
. - Add
SWIFT_VERSION
toBuild Settings -> Swift Compiler - Language
. - Fix
Multiple commands produce '.../Objects-normal/x86_64/ProductName.swiftmodule'
- target ProductNames should differ. - Set "Defines Modules" to "Yes" in
Build Settings -> Packaging
. #import "Objective-C Generated Interface Header Name"
- Remove
#import "ProductName-Swift.h"
from headers to implementation, add forward declaration to headers.
I've got such a crash in Release mode. Xcode showed only 2 rows in the Main thread tab:
pthread_kill
...
start
The address at which the app crashed looked like this:
NewerOlder