Skip to content

Commit

Permalink
suppress rendering keyboard on screenshot only if runtime is iOS 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
banjun committed Oct 4, 2023
1 parent 62fcb38 commit da732b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/KIF/Additions/UIApplication-KIFAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ - (BOOL)writeScreenshotForLine:(NSUInteger)lineNumber inFile:(NSString *)filenam
continue;
}

if (window == keyboardWindow) {
continue;
if (@available(iOS 17.0, *)) {
if (window == keyboardWindow) {
continue;
}
}

if ([window respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)]) {
Expand Down

0 comments on commit da732b5

Please sign in to comment.