quri / Titanium

View controller transition for image & photo previews
MIT License
40 stars 4 forks source link

Support of non-storyboard #2

Closed SebastianThiebaud closed 10 years ago

SebastianThiebaud commented 10 years ago

When Titanium is used in a non-storyboard project there is 2 major and critical issues:

@implementation ESImageViewController

- (id)init {
    self = [super init];

    if (self) {
        [self setModalPresentationStyle:UIModalPresentationCustom];
        [self setTransitioningDelegate:self];
        self.view.backgroundColor = [UIColor blackColor];
    }

    return self;
}

- (void)awakeFromNib {
    [self setModalPresentationStyle:UIModalPresentationCustom];
    [self setTransitioningDelegate:self];
}

Keeping the two method calls in -awakeFromNib and add them to -init too.

Titanium should support storyboarded and non-storyboarded view controllers. Please take care of the possible absence of a segue.

xzoky commented 10 years ago

Both issues should be fixed in 0.3.