diff options
author | siqi <me@siqi.fr> | 2013-07-04 15:34:00 +0200 |
---|---|---|
committer | siqi <me@siqi.fr> | 2013-07-05 09:56:05 +0200 |
commit | c9ad57b3c3f1cac0b0cb86acbc352807a122082b (patch) | |
tree | 164c2bb333805df06ea71a205880b278672a592b /ios | |
parent | connect to server list implemented (diff) | |
download | core-c9ad57b3c3f1cac0b0cb86acbc352807a122082b.tar.gz core-c9ad57b3c3f1cac0b0cb86acbc352807a122082b.zip |
swipe to delete
Change-Id: I44bd989f301b3da5a1c821d065b55c95df6dbce6
Diffstat (limited to 'ios')
-rw-r--r-- | ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard | 12 | ||||
-rw-r--r-- | ios/iosremote/iosremote/serverList_vc.m | 21 |
2 files changed, 14 insertions, 19 deletions
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard index 076481549148..d7966c6c3491 100644 --- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard +++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard @@ -58,8 +58,6 @@ </objects> <point key="canvasLocation" x="528" y="118"/> </scene> -<<<<<<< HEAD -======= <!--Pin Validation vc--> <scene sceneID="aCW-l9-UDx"> <objects> @@ -103,7 +101,6 @@ </objects> <point key="canvasLocation" x="528" y="872"/> </scene> ->>>>>>> threading fixes & preview screen <!--New Server View Controller - New Server--> <scene sceneID="tlJ-c5-Jp2"> <objects> @@ -151,9 +148,6 @@ </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="b5I-aN-vyr" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> -<<<<<<< HEAD - <point key="canvasLocation" x="1133" y="-6"/> -======= <point key="canvasLocation" x="1052" y="-63"/> </scene> <!--View Controller--> @@ -323,8 +317,6 @@ <point key="canvasLocation" x="1581" y="684"/> </scene> </scenes> -<<<<<<< HEAD -======= <resources> <image name="Default@2x.png" width="640" height="960"/> </resources> @@ -358,16 +350,12 @@ </relationships> </class> </classes> ->>>>>>> threading fixes & preview screen <simulatedMetricsContainer key="defaultSimulatedMetrics"> <simulatedStatusBarMetrics key="statusBar"/> <simulatedOrientationMetrics key="orientation"/> <simulatedScreenMetrics key="destination" type="retina4"/> </simulatedMetricsContainer> -<<<<<<< HEAD -======= <inferredMetricsTieBreakers> <segue reference="YBj-zE-J7L"/> </inferredMetricsTieBreakers> ->>>>>>> threading fixes & preview screen </document> diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m index 4164c78d8811..ccd9f24b6fea 100644 --- a/ios/iosremote/iosremote/serverList_vc.m +++ b/ios/iosremote/iosremote/serverList_vc.m @@ -61,13 +61,6 @@ // Dispose of any resources that can be recreated. } -#pragma mark - Table view data source - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 1; -} - #pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath @@ -95,7 +88,21 @@ return cell; } +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath +{ + return YES; +} +- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{ + return UITableViewCellEditingStyleDelete; +} +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ + + if(editingStyle == UITableViewCellEditingStyleDelete){ + [self.comManager removeServerAtIndex:indexPath.row]; + [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } +} @end |