Files
ppsspp/ios/ViewControllerCommon.h
T
Henrik RydgårdandClaude Opus 5.5 c8c3ba8bb6 iOS: Give the soft keyboard a view of its own
The view controller was the keyboard's text input, and UIKit hands first
responder back to it whenever something it presented goes away: a share
sheet, a photo picker, the alert after an app icon change. Each time,
up came the keyboard, and hideKeyboard calls were sprinkled around to
put it away again, one on a four second timer.

Text input now goes to a small view that only becomes first responder
when a text field gets focus. The view controller is first responder
otherwise, for hardware keyboard presses, but takes no text, so it can't
bring up the keyboard. The workaround hideKeyboard calls are gone, and
so is the endEditing on rotation, which dropped the keyboard if you
turned the phone while typing. Showing and hiding are synchronous now,
since every caller is on the main thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:09:41 +02:00

46 lines
1.3 KiB
Objective-C

#pragma once
#import <UIKit/UIKit.h>
#import <PhotosUI/PhotosUI.h>
#import <GameController/GameController.h>
#import "CameraHelper.h"
#import "LocationHelper.h"
#import "iCade/iCadeReaderView.h"
@interface PPSSPPBaseViewController : UIViewController<
UIImagePickerControllerDelegate, UINavigationControllerDelegate,
PHPickerViewControllerDelegate,
CameraFrameDelegate, LocationHandlerDelegate,
UIGestureRecognizerDelegate, iCadeEventDelegate>
- (void)hideKeyboard;
- (void)showKeyboard;
- (void)shareText:(NSString *)text;
- (void)shareFile:(NSURL *)url;
- (void)shutdown;
- (void)bindDefaultFBO;
- (void)startLocation;
- (void)stopLocation;
- (void)startVideo:(int)width height:(int)height;
- (void)stopVideo;
- (void)appSwitchModeChanged;
- (void)immersiveModeChanged;
- (void)setupController:(GCController *)controller;
// Forwarded from the AppDelegate
- (void)didBecomeActive;
- (void)willResignActive;
- (void)uiStateChanged;
- (void)pickPhoto:(NSString *)saveFilename requestId:(int)requestId;
- (void)updateResolutionWithView:(UIView *)view;
@end
extern PPSSPPBaseViewController *sharedViewController;
#define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
#define IS_IPHONE() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)