这是 EKEventEditViewController 的错误吗

发布于 2024-10-09 21:05:42 字数 615 浏览 2 评论 0原文

I found EKEventEditViewController is not correct in 
UIInterfaceOrientationPortraitUpside.

Try this demo from your site, I just changed code as below, put simulator to 
UpSide Down Portrait mode, then click "+" button, you will find the screen in 
flash, this is due to dialog is upside in short time.

Then you can try it on device turn to UpSideDown mode, you will see what I am talking:)

I want to know why they have different view in Simulator or iPad even if it is 
not a bug.

SimpleEKDemo 中的错误

I found EKEventEditViewController is not correct in 
UIInterfaceOrientationPortraitUpside.

Try this demo from your site, I just changed code as below, put simulator to 
UpSide Down Portrait mode, then click "+" button, you will find the screen in 
flash, this is due to dialog is upside in short time.

Then you can try it on device turn to UpSideDown mode, you will see what I am talking:)

I want to know why they have different view in Simulator or iPad even if it is 
not a bug.

Bug in SimpleEKDemo

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哥,最终变帅啦 2024-10-16 21:05:42

基本上,您需要创建自己的继承自 EKEventEditViewController 的类,并在通常使用 EKEventEditViewController 的任何地方使用该类。例如,KonopEventEditViewController。

KonopEventEditViewController.h如下

#import <EventKitUI/EventKitUI.h>

@interface KonopEventEditViewController : EKEventEditViewController

@end

KonopEventEditViewController.m如下

#import "KonopEventEditViewController.h"

@interface KonopEventEditViewController ()

@end

@implementation KonopEventEditViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

@end

Basically you would want to Create your own class that inherits from EKEventEditViewController and use that everywhere you would use normally use EKEventEditViewController. For example, KonopEventEditViewController.

KonopEventEditViewController.h is as follows

#import <EventKitUI/EventKitUI.h>

@interface KonopEventEditViewController : EKEventEditViewController

@end

KonopEventEditViewController.m is as follows

#import "KonopEventEditViewController.h"

@interface KonopEventEditViewController ()

@end

@implementation KonopEventEditViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

@end
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文