add iOS AppDelegate interface to app_delegate.h
This commit is contained in:
@@ -1,7 +1,26 @@
|
|||||||
#ifndef YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
#ifndef YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
||||||
#define YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
#define YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
||||||
|
|
||||||
#ifdef TARGET_OS_MAC
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
|
/* Apple OSX and iOS (Darwin). */
|
||||||
|
#import <CoreText/CoreText.h>
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
|
||||||
|
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||||
|
/* iOS in Xcode simulator */
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface AppDelegate : UIResponder <UIApplicationDelegate, UIDocumentPickerDelegate>
|
||||||
|
@property (strong, nonatomic) UIWindow *window;
|
||||||
|
|
||||||
|
@property UIDocumentPickerViewController *documentPicker;
|
||||||
|
@property (nonatomic, copy) void (^completionHandler)(NSString *selectedFile);
|
||||||
|
|
||||||
|
- (void)presentDocumentPickerWithCompletionHandler:(void (^)(NSString *selectedFile))completionHandler;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#elif TARGET_OS_MAC == 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -15,4 +34,6 @@ void InitializeCocoa();
|
|||||||
|
|
||||||
#endif // TARGET_OS_MAC
|
#endif // TARGET_OS_MAC
|
||||||
|
|
||||||
|
#endif // defined(__APPLE__) && defined(__MACH__)
|
||||||
|
|
||||||
#endif // YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
#endif // YAZE_APP_CORE_PLATFORM_APP_DELEGATE_H
|
||||||
|
|||||||
@@ -11,12 +11,9 @@
|
|||||||
|
|
||||||
#import <CoreText/CoreText.h>
|
#import <CoreText/CoreText.h>
|
||||||
|
|
||||||
#if TARGET_IPHONE_SIMULATOR == 1
|
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||||
/* iOS in Xcode simulator */
|
/* iOS in Xcode simulator */
|
||||||
|
|
||||||
#elif TARGET_OS_IPHONE == 1
|
|
||||||
/* iOS */
|
|
||||||
|
|
||||||
#elif TARGET_OS_MAC == 1
|
#elif TARGET_OS_MAC == 1
|
||||||
/* macOS */
|
/* macOS */
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user