Skip to content
Snippets Groups Projects
Commit fffac0b4 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent 8e3b8b87
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,8 @@
{
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
selectedModel = [[models objectAtIndex:indexPath.row] getFile];
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] || [[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] ||
[[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
appDelegate.splitViewController.initialModel = selectedModel;
[UIView transitionWithView:appDelegate.window
duration:0.5
......
......@@ -8,7 +8,6 @@
#import "AppDelegate.h"
@implementation UIErrorAlertView
-(void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated
......@@ -45,8 +44,13 @@
-(void)viewWillAppear:(BOOL)animated
{
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] || [[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]) {
_loadingAlert = [[UIAlertView alloc] initWithTitle:@"Please wait..." message: @"The model is loading" delegate: self cancelButtonTitle: nil otherButtonTitles: nil];
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] ||
[[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]) {
_loadingAlert = [[UIAlertView alloc] initWithTitle:@"Please wait..."
message: @"The model is loading"
delegate: self
cancelButtonTitle: nil
otherButtonTitles: nil];
[_loadingAlert show];
}
}
......@@ -87,7 +91,8 @@
_runStopButton = [[UIBarButtonItem alloc] initWithTitle:@"Run" style:UIBarButtonItemStyleBordered target:self action:@selector(compute)];
//UIBarButtonItem *share = [[UIBarButtonItem alloc] initWithTitle:@"Share" style:UIBarButtonItemStyleBordered target:self action:@selector(share)];
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] || [[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] ||
[[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
UIBarButtonItem *model = [[UIBarButtonItem alloc] initWithTitle:@"Model list" style:UIBarButtonItemStyleBordered target:self action:@selector(showModelsList)];
[self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects:_runStopButton, model, /*share,*/ nil]];
}
......@@ -268,7 +273,8 @@
[alert show];
return;
}
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] || [[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] ||
[[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
[UIView transitionWithView:appDelegate.window
duration:0.5
......
......@@ -39,7 +39,8 @@
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil];
[control addTarget:self action:@selector(indexDidChangeForSegmentedControl:) forControlEvents:UIControlEventValueChanged];
if(![[UIDevice currentDevice].model isEqualToString:@"iPad"] && ![[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"])
if(![[UIDevice currentDevice].model isEqualToString:@"iPad"]
&& ![[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"])
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(backButtonPressed:)];
else
self.navigationItem.hidesBackButton = true;
......@@ -201,7 +202,8 @@
{
if(indexPath.section != 1) return;
UIStoryboard *storyboard;
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] || [[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"])
if([[UIDevice currentDevice].model isEqualToString:@"iPad"] ||
[[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"])
storyboard = [UIStoryboard storyboardWithName:@"iPadStoryboard" bundle:nil];
else
storyboard = [UIStoryboard storyboardWithName:@"iPhoneiPodStoryboard" bundle:nil];
......
......@@ -41,7 +41,8 @@
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
self.toolbarItems = [[NSArray alloc] initWithObjects:flexibleSpace, controlBtn, flexibleSpace, nil];
[control addTarget:self action:@selector(indexDidChangeForSegmentedControl:) forControlEvents:UIControlEventValueChanged];
if(![[UIDevice currentDevice].model isEqualToString:@"iPad"] && ![[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
if(![[UIDevice currentDevice].model isEqualToString:@"iPad"] &&
![[UIDevice currentDevice].model isEqualToString:@"iPad Simulator"]){
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(backButtonPressed:)];
}
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Reset" style:UIBarButtonItemStyleBordered target:self action:@selector(resetParameters:)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment