Here is a small problem I am having. I am not too good at programmatically changing views, but this is what I have:
//(.h)
#import <UIKit/UIKit.h>
#import "Detail.h"
@interface List : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
}
@property (retain, nonatomic) IBOutlet UITableView *tableView;
@property (retain, nonatomic) Detail *detail;
@end
and
//(.m)
@synthesize detail=_detail;
- (Detail *)detail
{
NSLog(@"Detail UIView construction started.");
if (_detail != nil)
{
return _detail;
}
Detail *aDetailView = [[Detail alloc] init];
_detail = aDetailView;
[self.view addSubview:_detail.view];
//I never really set it to setHidden:YES, but just to make sure I'm setting it NO here.
[_detail.view setHidden:NO];
return _detail;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[UIView transitionFromView:self.view toView:self.detail.view duration:1 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil];
}
As output:
2012-02-07 11:17:51.909 TodoApp[4232:fb03] Detail UIView construction started.
The view seems to do the FlipFromRight animation fine, but the screen is totally black.
As I said, I’m not good at changing views programmatically.
Thanks for any help!
=============
Answering my own question.
It was really stupid. The “Back” button in the Title bar had an unsupported configuration. So the View did not want to load… fixed it now.
Answering my own question.
It was really stupid. The “Back” button in the Title bar had an unsupported configuration. So the View did not want to load… fixed it now.