简体   繁体   English

这是EKEventEditViewController的错误吗

[英]Is this a bug for EKEventEditViewController

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 SimpleEKDemo中的错误

Basically you would want to Create your own class that inherits from EKEventEditViewController and use that everywhere you would use normally use EKEventEditViewController. 基本上,您将要创建一个继承自EKEventEditViewController的类,并在通常使用EKEventEditViewController的所有地方使用该类。 For example, KonopEventEditViewController. 例如,KonopEventEditViewController。

KonopEventEditViewController.h is as follows KonopEventEditViewController.h如下

#import <EventKitUI/EventKitUI.h>

@interface KonopEventEditViewController : EKEventEditViewController

@end

KonopEventEditViewController.m is as follows 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM