Converted infoViewController to use AutoLayout; Removed landscape view in xib; Using a UITextView for instructions and added instructions on how to import your own disk images with multi-disk support; added instructions for gamepad and save state support
This commit is contained in:
parent
953c76e076
commit
db1217ea74
File diff suppressed because it is too large
Load Diff
|
@ -10,18 +10,13 @@
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
UIView* _portraitView;
|
UIView* _portraitView;
|
||||||
UIView* _landscapeView;
|
|
||||||
UILabel* _versionUI;
|
UILabel* _versionUI;
|
||||||
UILabel* _versionUILandscape;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, strong) IBOutlet UILabel* versionUILandscape;
|
|
||||||
@property (nonatomic, strong) IBOutlet UILabel* versionUI;
|
@property (nonatomic, strong) IBOutlet UILabel* versionUI;
|
||||||
@property (nonatomic, strong) IBOutlet UIView* portraitView;
|
@property (nonatomic, strong) IBOutlet UIView* portraitView;
|
||||||
@property (nonatomic, strong) IBOutlet UIView* landscapeView;
|
@property (nonatomic, strong) IBOutlet UIScrollView *instructionsView;
|
||||||
|
|
||||||
//- (void)updateView:(UIDeviceOrientation)_orientation ;
|
|
||||||
- (void)updateView ;
|
|
||||||
- (IBAction) doneButton:(id)_sender;
|
- (IBAction) doneButton:(id)_sender;
|
||||||
- (IBAction) parametersButton:(id)_sender;
|
- (IBAction) parametersButton:(id)_sender;
|
||||||
- (IBAction) emailButton:(id)_sender;
|
- (IBAction) emailButton:(id)_sender;
|
||||||
|
|
|
@ -14,11 +14,7 @@
|
||||||
@implementation infoViewController
|
@implementation infoViewController
|
||||||
|
|
||||||
@synthesize versionUI=_versionIU;
|
@synthesize versionUI=_versionIU;
|
||||||
@synthesize versionUILandscape=_versionUILandscape;
|
|
||||||
@synthesize portraitView= _portraitView;
|
@synthesize portraitView= _portraitView;
|
||||||
@synthesize landscapeView = _landscapeView;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-(void)viewDidLoad
|
-(void)viewDidLoad
|
||||||
{
|
{
|
||||||
|
@ -27,19 +23,15 @@
|
||||||
NSString *buildVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
|
NSString *buildVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
|
||||||
|
|
||||||
|
|
||||||
self.versionUILandscape.text=
|
|
||||||
self.versionUI.text = [NSString stringWithFormat: @"v%@.%@ -- ActiveGS "TOSTRING(ACTIVEGSMAJOR)"."TOSTRING(ACTIVEGSMINOR)"."TOSTRING(ACTIVEGSBUILD)"",appVersion,buildVersion];
|
self.versionUI.text = [NSString stringWithFormat: @"v%@.%@ -- ActiveGS "TOSTRING(ACTIVEGSMAJOR)"."TOSTRING(ACTIVEGSMINOR)"."TOSTRING(ACTIVEGSBUILD)"",appVersion,buildVersion];
|
||||||
|
|
||||||
[self.portraitView setFrame:[[UIScreen mainScreen] bounds] ];
|
|
||||||
[self.landscapeView setFrame:[[UIScreen mainScreen] bounds] ];
|
|
||||||
|
|
||||||
// [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
// [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)viewDidAppear:(BOOL)animated
|
-(void)viewDidAppear:(BOOL)animated
|
||||||
{
|
{
|
||||||
printf("viewDidAppear");
|
printf("viewDidAppear");
|
||||||
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
// Swipe left to go back to browsing
|
// Swipe left to go back to browsing
|
||||||
UISwipeGestureRecognizer* grswipeleft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)];
|
UISwipeGestureRecognizer* grswipeleft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)];
|
||||||
|
@ -53,32 +45,7 @@
|
||||||
grswiperight.cancelsTouchesInView = NO;
|
grswiperight.cancelsTouchesInView = NO;
|
||||||
[self.view addGestureRecognizer:grswiperight];
|
[self.view addGestureRecognizer:grswiperight];
|
||||||
|
|
||||||
}
|
[self.instructionsView flashScrollIndicators];
|
||||||
|
|
||||||
/*
|
|
||||||
-(void)updateView:(UIDeviceOrientation)_orientation
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
-(void)updateView
|
|
||||||
{
|
|
||||||
debug_printf("updateView infoViewController");
|
|
||||||
|
|
||||||
|
|
||||||
BOOL isPortrait = abs([pManager getAngle])==90.0f ;
|
|
||||||
|
|
||||||
if (isPortrait)
|
|
||||||
self.view = self.portraitView;
|
|
||||||
else
|
|
||||||
self.view = self.landscapeView;
|
|
||||||
|
|
||||||
self.view = self.portraitView;
|
|
||||||
|
|
||||||
// pour réactiver les gestures
|
|
||||||
[self viewDidAppear:FALSE];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,15 +102,4 @@
|
||||||
return UIInterfaceOrientationMaskAll;
|
return UIInterfaceOrientationMaskAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
|
||||||
{
|
|
||||||
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
|
||||||
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
|
||||||
[self updateView];
|
|
||||||
|
|
||||||
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
|
||||||
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue