Skip to content
Snippets Groups Projects
Commit 4dbc9051 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

iOS: some fixes

parent 0df65936
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@
[self.navigationController setToolbarHidden:YES animated:YES];
if(self.initialModel != nil){
[self.glView load:self.initialModel];
[[NSNotificationCenter defaultCenter] postNotificationName:@"refreshParameters" object:nil];
//[self.initialModel release];
self.initialModel = nil;
[_loadingAlert dismissWithClickedButtonIndex:-1 animated:YES];
......
......@@ -40,14 +40,10 @@
<array>
<string>onelab</string>
</array>
<key>NSDocumentClass</key>
<string>Document</string>
<key>CFBundleTypeName</key>
<string>Onelab package</string>
<key>LSTypeIsPackage</key>
<true/>
<key>CFBundleTypeName</key>
<string>Onelab</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>LSRequiresIPhoneOS</key>
......
......@@ -50,6 +50,8 @@
[control addTarget:self action:@selector(indexDidChangeForSegmentedControl:) forControlEvents:UIControlEventValueChanged];
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;
}
- (void)viewWillAppear:(BOOL)animated
{
......
......@@ -101,6 +101,12 @@
[self.tableView insertRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationAutomatic];
[self.tableView endUpdates];
}
- (void)removeParemeterNumber:(onelab::number)p atIndex:(NSIndexPath*)index
{
[self.tableView beginUpdates];
[self.tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject:index] withRowAnimation:UITableViewRowAnimationAutomatic];
[self.tableView endUpdates];
}
- (void)addSection:(NSMutableArray*)s withTitle:(NSString*)t withParameterNumber:(onelab::number)p
{
[_sections addObject:s];
......@@ -137,7 +143,10 @@
for(int iparameter = 0; iparameter<[section count]; iparameter++) {
if([[[section objectAtIndex: iparameter] getName] isEqualToString:name]) { // The parameter is in the section
Parameter * p = [section objectAtIndex: iparameter];
if(number[i].getVisible())
[p refresh]; // just refresh the parameter
else
[self removeParemeterNumber:number[i] atIndex:[NSIndexPath indexPathForRow:iparameter inSection:iSection]];
found = true;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment