Kaydet (Commit) 135cb84e authored tarafından siqi's avatar siqi

iOS5 backward compatible

Change-Id: Ia540e68d953069e5f690a36303823f59e1129b46
üst fc0a23e5
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
57C6E405175E06E800E8BC5F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E404175E06E800E8BC5F /* Default.png */; }; 57C6E405175E06E800E8BC5F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E404175E06E800E8BC5F /* Default.png */; };
57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E406175E06E800E8BC5F /* Default@2x.png */; }; 57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E406175E06E800E8BC5F /* Default@2x.png */; };
57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E408175E06E800E8BC5F /* Default-568h@2x.png */; }; 57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E408175E06E800E8BC5F /* Default-568h@2x.png */; };
57C6E40C175E06E800E8BC5F /* iPhone_autolayout.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */; };
57C6E42E175E076900E8BC5F /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E427175E076900E8BC5F /* Client.m */; }; 57C6E42E175E076900E8BC5F /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E427175E076900E8BC5F /* Client.m */; };
57C6E42F175E076900E8BC5F /* CommunicationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E429175E076900E8BC5F /* CommunicationManager.m */; }; 57C6E42F175E076900E8BC5F /* CommunicationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E429175E076900E8BC5F /* CommunicationManager.m */; };
57C6E430175E076900E8BC5F /* CommandInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E42B175E076900E8BC5F /* CommandInterpreter.m */; }; 57C6E430175E076900E8BC5F /* CommandInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E42B175E076900E8BC5F /* CommandInterpreter.m */; };
...@@ -49,7 +48,7 @@ ...@@ -49,7 +48,7 @@
57DC7007178D84490050FC58 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57DC7006178D84490050FC58 /* CoreMotion.framework */; }; 57DC7007178D84490050FC58 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57DC7006178D84490050FC58 /* CoreMotion.framework */; };
57DC700F178E03330050FC58 /* touchPointer_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57DC700E178E03330050FC58 /* touchPointer_vc.m */; }; 57DC700F178E03330050FC58 /* touchPointer_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57DC700E178E03330050FC58 /* touchPointer_vc.m */; };
57DC7012178E16A40050FC58 /* setRecursiveUserInteraction.m in Sources */ = {isa = PBXBuildFile; fileRef = 57DC7011178E16A40050FC58 /* setRecursiveUserInteraction.m */; }; 57DC7012178E16A40050FC58 /* setRecursiveUserInteraction.m in Sources */ = {isa = PBXBuildFile; fileRef = 57DC7011178E16A40050FC58 /* setRecursiveUserInteraction.m */; };
57DF0A85178FFFAB008B2D3D /* iPhone_spring&strut.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57DF0A83178FFFAB008B2D3D /* iPhone_spring&strut.storyboard */; }; 57DF0A85178FFFAB008B2D3D /* iPhone_autosize.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57DF0A83178FFFAB008B2D3D /* iPhone_autosize.storyboard */; };
57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E21785C61400B50125 /* pinValidation_vc.m */; }; 57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E21785C61400B50125 /* pinValidation_vc.m */; };
57FE71E61785D7FE00B50125 /* slideShowPreview_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E51785D7FE00B50125 /* slideShowPreview_vc.m */; }; 57FE71E61785D7FE00B50125 /* slideShowPreview_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E51785D7FE00B50125 /* slideShowPreview_vc.m */; };
57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E817861A9000B50125 /* slideShowPreviewTable_vc.m */; }; 57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E817861A9000B50125 /* slideShowPreviewTable_vc.m */; };
...@@ -99,7 +98,6 @@ ...@@ -99,7 +98,6 @@
57C6E404175E06E800E8BC5F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; }; 57C6E404175E06E800E8BC5F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
57C6E406175E06E800E8BC5F /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; }; 57C6E406175E06E800E8BC5F /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
57C6E408175E06E800E8BC5F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; }; 57C6E408175E06E800E8BC5F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
57C6E40B175E06E800E8BC5F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/iPhone_autolayout.storyboard; sourceTree = "<group>"; };
57C6E426175E076900E8BC5F /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = "<group>"; }; 57C6E426175E076900E8BC5F /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = "<group>"; };
57C6E427175E076900E8BC5F /* Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; }; 57C6E427175E076900E8BC5F /* Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; };
57C6E428175E076900E8BC5F /* CommunicationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CommunicationManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 57C6E428175E076900E8BC5F /* CommunicationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CommunicationManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
...@@ -119,7 +117,7 @@ ...@@ -119,7 +117,7 @@
57DC700E178E03330050FC58 /* touchPointer_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = touchPointer_vc.m; sourceTree = "<group>"; }; 57DC700E178E03330050FC58 /* touchPointer_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = touchPointer_vc.m; sourceTree = "<group>"; };
57DC7010178E16A40050FC58 /* setRecursiveUserInteraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = setRecursiveUserInteraction.h; sourceTree = "<group>"; }; 57DC7010178E16A40050FC58 /* setRecursiveUserInteraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = setRecursiveUserInteraction.h; sourceTree = "<group>"; };
57DC7011178E16A40050FC58 /* setRecursiveUserInteraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = setRecursiveUserInteraction.m; sourceTree = "<group>"; }; 57DC7011178E16A40050FC58 /* setRecursiveUserInteraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = setRecursiveUserInteraction.m; sourceTree = "<group>"; };
57DF0A84178FFFAB008B2D3D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = "en.lproj/iPhone_spring&strut.storyboard"; sourceTree = "<group>"; }; 57DF0A84178FFFAB008B2D3D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/iPhone_autoSize.storyboard; sourceTree = "<group>"; };
57FE71E11785C61300B50125 /* pinValidation_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pinValidation_vc.h; path = Communication/pinValidation_vc.h; sourceTree = "<group>"; }; 57FE71E11785C61300B50125 /* pinValidation_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pinValidation_vc.h; path = Communication/pinValidation_vc.h; sourceTree = "<group>"; };
57FE71E21785C61400B50125 /* pinValidation_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = pinValidation_vc.m; path = Communication/pinValidation_vc.m; sourceTree = "<group>"; }; 57FE71E21785C61400B50125 /* pinValidation_vc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = pinValidation_vc.m; path = Communication/pinValidation_vc.m; sourceTree = "<group>"; };
57FE71E41785D7FE00B50125 /* slideShowPreview_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slideShowPreview_vc.h; sourceTree = "<group>"; }; 57FE71E41785D7FE00B50125 /* slideShowPreview_vc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slideShowPreview_vc.h; sourceTree = "<group>"; };
...@@ -296,8 +294,7 @@ ...@@ -296,8 +294,7 @@
57DF0A78178FFF8C008B2D3D /* StoryBoards */ = { 57DF0A78178FFF8C008B2D3D /* StoryBoards */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
57DF0A83178FFFAB008B2D3D /* iPhone_spring&strut.storyboard */, 57DF0A83178FFFAB008B2D3D /* iPhone_autosize.storyboard */,
57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */,
); );
name = StoryBoards; name = StoryBoards;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -358,7 +355,6 @@ ...@@ -358,7 +355,6 @@
57C6E405175E06E800E8BC5F /* Default.png in Resources */, 57C6E405175E06E800E8BC5F /* Default.png in Resources */,
57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */, 57C6E407175E06E800E8BC5F /* Default@2x.png in Resources */,
57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */, 57C6E409175E06E800E8BC5F /* Default-568h@2x.png in Resources */,
57C6E40C175E06E800E8BC5F /* iPhone_autolayout.storyboard in Resources */,
57867A541787172A00EBBE52 /* impress.jpeg in Resources */, 57867A541787172A00EBBE52 /* impress.jpeg in Resources */,
57867A5A1787510700EBBE52 /* pushed_next_button.png in Resources */, 57867A5A1787510700EBBE52 /* pushed_next_button.png in Resources */,
57867A5B1787510700EBBE52 /* released_next_button.png in Resources */, 57867A5B1787510700EBBE52 /* released_next_button.png in Resources */,
...@@ -374,7 +370,7 @@ ...@@ -374,7 +370,7 @@
57CC48C7178B42A400075DE4 /* timer_resume_btn.png in Resources */, 57CC48C7178B42A400075DE4 /* timer_resume_btn.png in Resources */,
57DC7003178D82610050FC58 /* ic_launcher.png in Resources */, 57DC7003178D82610050FC58 /* ic_launcher.png in Resources */,
57DC7005178D82940050FC58 /* ic_launcher@2x.png in Resources */, 57DC7005178D82940050FC58 /* ic_launcher@2x.png in Resources */,
57DF0A85178FFFAB008B2D3D /* iPhone_spring&strut.storyboard in Resources */, 57DF0A85178FFFAB008B2D3D /* iPhone_autosize.storyboard in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -420,20 +416,12 @@ ...@@ -420,20 +416,12 @@
name = InfoPlist.strings; name = InfoPlist.strings;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */ = { 57DF0A83178FFFAB008B2D3D /* iPhone_autosize.storyboard */ = {
isa = PBXVariantGroup;
children = (
57C6E40B175E06E800E8BC5F /* en */,
);
name = iPhone_autolayout.storyboard;
sourceTree = "<group>";
};
57DF0A83178FFFAB008B2D3D /* iPhone_spring&strut.storyboard */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
57DF0A84178FFFAB008B2D3D /* en */, 57DF0A84178FFFAB008B2D3D /* en */,
); );
name = "iPhone_spring&strut.storyboard"; name = iPhone_autosize.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXVariantGroup section */ /* End PBXVariantGroup section */
......
...@@ -17,29 +17,16 @@ ...@@ -17,29 +17,16 @@
landmarkType = "3"> landmarkType = "3">
</FileBreakpoint> </FileBreakpoint>
<FileBreakpoint <FileBreakpoint
shouldBeEnabled = "Yes" shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "iosremote/newServer_vc.m"
timestampString = "395055655.034211"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "-viewWillAppear:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "iosremote/newServer_vc.m" filePath = "iosremote/slideShowSwipeInList.m"
timestampString = "395055655.034211" timestampString = "395327716.10653"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "46" startingLineNumber = "122"
endingLineNumber = "46" endingLineNumber = "122"
landmarkName = "-viewDidLoad" landmarkName = "-tableView:cellForRowAtIndexPath:"
landmarkType = "5"> landmarkType = "5">
</FileBreakpoint> </FileBreakpoint>
</FileBreakpoints> </FileBreakpoints>
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
@class ViewController; @class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate> { @interface AppDelegate : UIResponder <UIApplicationDelegate> {
// make sure we instanciate only once motionManager
CMMotionManager *motionManager; CMMotionManager *motionManager;
} }
@property (readonly) CMMotionManager *motionManager; @property (readonly) CMMotionManager *motionManager;
@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end @end
...@@ -10,9 +10,27 @@ ...@@ -10,9 +10,27 @@
@implementation AppDelegate @implementation AppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
// Override point for customization after application launch. // Override point for customization after application launch.
/**
* If ever we need some iOS6-only storyboard based features and we want to keep backward compatibility, we should uncomment these code to pick the right storyboard based on the existence on certains classes.
*/
// UIStoryboard *mainStoryboard = nil;
// if (NSClassFromString(@"NSLayoutConstraint")) {
// mainStoryboard = [UIStoryboard storyboardWithName:@"iPhone_autolayout" bundle:nil];
// NSLog(@"loading autolayout storyboard");
// } else {
// mainStoryboard = [UIStoryboard storyboardWithName:@"iPhone_autosize" bundle:nil];
// NSLog(@"Doesn't support autolayout, loading autosize");
// }
//
// self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// self.window.rootViewController = [mainStoryboard instantiateInitialViewController];
// [self.window makeKeyAndVisible];
return YES; return YES;
} }
......
...@@ -723,58 +723,63 @@ ...@@ -723,58 +723,63 @@
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Title of the presentation(TODO)" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="178" translatesAutoresizingMaskIntoConstraints="NO" id="nJf-ed-YfY"> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Title of the presentation(TODO)" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="178" translatesAutoresizingMaskIntoConstraints="NO" id="nJf-ed-YfY">
<constraints> <constraints>
<constraint firstAttribute="width" constant="178" id="wto-RF-nap"/> <constraint firstAttribute="height" constant="90" id="1hf-EL-dAY"/>
<constraint firstAttribute="width" constant="178" id="oTg-63-OXu"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Author: author name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5m-gQ-o0u"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2w1-DC-NmV">
<constraints> <subviews>
<constraint firstAttribute="height" constant="12" type="user" id="6dy-Ki-jHp"/> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Author: author name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5m-gQ-o0u">
<constraint firstAttribute="width" constant="160" id="uDT-Sz-6yp"/> <constraints>
</constraints> <constraint firstAttribute="height" constant="12" type="user" id="6dy-Ki-jHp"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <constraint firstAttribute="width" constant="160" id="uDT-Sz-6yp"/>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/> </constraints>
<nil key="highlightedColor"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
</label> <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Last modified: 3 Jul 2013" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dds-oJ-Uhh"> <nil key="highlightedColor"/>
<constraints> </label>
<constraint firstAttribute="width" constant="194" id="ejq-Nh-ofA"/> <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Last modified: 3 Jul 2013" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dds-oJ-Uhh">
<constraint firstAttribute="height" constant="14" type="user" id="xvr-u8-mTb"/> <constraints>
</constraints> <constraint firstAttribute="height" constant="14" type="user" id="xvr-u8-mTb"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> </constraints>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="highlightedColor"/> <color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
</label> <nil key="highlightedColor"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current slide: 5 of 22" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mrB-Wd-OcP"> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Current slide: 5 of 22" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mrB-Wd-OcP">
<constraints>
<constraint firstAttribute="height" constant="16" type="user" id="4n7-Yu-phk"/>
<constraint firstAttribute="width" constant="169" id="ZdR-LV-4aK"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="16" type="user" id="4n7-Yu-phk"/> <constraint firstAttribute="trailing" secondItem="Dds-oJ-Uhh" secondAttribute="trailing" constant="20" symbolic="YES" type="default" id="7LJ-x2-nKz"/>
<constraint firstAttribute="width" constant="169" id="ZdR-LV-4aK"/> <constraint firstItem="g5m-gQ-o0u" firstAttribute="leading" secondItem="2w1-DC-NmV" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="7eg-Tz-OWY"/>
<constraint firstItem="mrB-Wd-OcP" firstAttribute="leading" secondItem="2w1-DC-NmV" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="9Q5-VN-l9h"/>
<constraint firstItem="g5m-gQ-o0u" firstAttribute="top" secondItem="2w1-DC-NmV" secondAttribute="top" constant="5" type="user" id="S04-dj-MD7"/>
<constraint firstAttribute="bottom" secondItem="mrB-Wd-OcP" secondAttribute="bottom" constant="4" type="user" id="X18-Zx-Jy8"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="leading" secondItem="2w1-DC-NmV" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="dnI-jO-0US"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="top" secondItem="g5m-gQ-o0u" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="hpH-2w-OOX"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/> </view>
<color key="textColor" name="alternateSelectedControlColor" catalog="System" colorSpace="catalog"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstItem="mrB-Wd-OcP" firstAttribute="leading" secondItem="2Zo-K8-3NM" secondAttribute="leading" constant="32" type="user" id="2tP-aR-jNq"/> <constraint firstItem="2w1-DC-NmV" firstAttribute="leading" secondItem="2Zo-K8-3NM" secondAttribute="leading" constant="12" id="27H-un-hlX"/>
<constraint firstItem="mrB-Wd-OcP" firstAttribute="leading" secondItem="Dds-oJ-Uhh" secondAttribute="leading" type="user" id="4dK-pH-sCn"/> <constraint firstItem="nJf-ed-YfY" firstAttribute="top" secondItem="2Zo-K8-3NM" secondAttribute="top" constant="12" id="9yy-AD-2z5"/>
<constraint firstItem="mrB-Wd-OcP" firstAttribute="top" secondItem="Dds-oJ-Uhh" secondAttribute="bottom" constant="8" type="user" id="4xF-Ed-MnM"/> <constraint firstAttribute="trailing" secondItem="2w1-DC-NmV" secondAttribute="trailing" constant="48" id="GZ0-ab-RrF"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="top" secondItem="g5m-gQ-o0u" secondAttribute="bottom" constant="8" type="user" id="6Hw-b9-1hx"/> <constraint firstItem="2w1-DC-NmV" firstAttribute="top" secondItem="2Zo-K8-3NM" secondAttribute="top" constant="98" id="ggV-M4-VXs"/>
<constraint firstItem="g5m-gQ-o0u" firstAttribute="leading" secondItem="Dds-oJ-Uhh" secondAttribute="leading" type="user" id="9IO-Cs-oNg"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="leading" secondItem="g5m-gQ-o0u" secondAttribute="leading" type="user" id="AxU-4u-7y0"/>
<constraint firstItem="g5m-gQ-o0u" firstAttribute="top" secondItem="nJf-ed-YfY" secondAttribute="bottom" constant="15" type="user" id="I8g-AQ-6mK"/>
<constraint firstItem="mrB-Wd-OcP" firstAttribute="top" secondItem="Dds-oJ-Uhh" secondAttribute="bottom" constant="8" symbolic="YES" type="user" id="Jzi-ST-t3y"/>
<constraint firstItem="g5m-gQ-o0u" firstAttribute="leading" secondItem="2Zo-K8-3NM" secondAttribute="leading" constant="32" type="user" id="KQN-2D-WYg"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="leading" secondItem="2Zo-K8-3NM" secondAttribute="leading" constant="32" type="user" id="V6U-Sp-6hc"/>
<constraint firstItem="g5m-gQ-o0u" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="2Zo-K8-3NM" secondAttribute="leading" constant="32" type="user" id="VP2-HW-0K1"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="leading" secondItem="mrB-Wd-OcP" secondAttribute="leading" type="user" id="WW4-GU-mSH"/>
<constraint firstItem="Dds-oJ-Uhh" firstAttribute="top" secondItem="g5m-gQ-o0u" secondAttribute="bottom" constant="8" symbolic="YES" type="user" id="gtQ-av-tu7"/>
<constraint firstAttribute="height" constant="169" type="user" id="kbX-jk-qBX"/> <constraint firstAttribute="height" constant="169" type="user" id="kbX-jk-qBX"/>
<constraint firstAttribute="bottom" secondItem="2w1-DC-NmV" secondAttribute="bottom" constant="4" id="leE-c3-5wP"/>
<constraint firstItem="nJf-ed-YfY" firstAttribute="centerX" secondItem="2Zo-K8-3NM" secondAttribute="centerX" type="default" id="qYz-zW-Lfz"/> <constraint firstItem="nJf-ed-YfY" firstAttribute="centerX" secondItem="2Zo-K8-3NM" secondAttribute="centerX" type="default" id="qYz-zW-Lfz"/>
<constraint firstItem="nJf-ed-YfY" firstAttribute="top" secondItem="2Zo-K8-3NM" secondAttribute="top" constant="20" symbolic="YES" type="user" id="qcW-Ip-dGx"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
...@@ -838,6 +843,7 @@ ...@@ -838,6 +843,7 @@
<class className="slideShowPreviewTable_vc" superclassName="UITableViewController"> <class className="slideShowPreviewTable_vc" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc.h"/> <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc.h"/>
<relationships> <relationships>
<relationship kind="action" name="startPresentationAction:"/>
<relationship kind="outlet" name="optionsTable" candidateClass="UITableView"/> <relationship kind="outlet" name="optionsTable" candidateClass="UITableView"/>
</relationships> </relationships>
</class> </class>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>iPhone_autolayout</string> <string>iPhone_autoSize</string>
<key>UIPrerenderedIcon</key> <key>UIPrerenderedIcon</key>
<true/> <true/>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>
......
...@@ -63,14 +63,18 @@ ...@@ -63,14 +63,18 @@
{ {
if (self.slidesRunning && [self.comManager.interpreter.slideShow size] > 0){ if (self.slidesRunning && [self.comManager.interpreter.slideShow size] > 0){
self.slidesRunning = NO; self.slidesRunning = NO;
[self.parentViewController performSegueWithIdentifier:@"slideShowSegue" sender:self]; [self performSegueWithIdentifier:@"slideShowSegue" sender:self];
} }
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue]; NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
self.slideShowStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING self.slideShowStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING
object:nil object:nil
queue:mainQueue queue:mainQueue
usingBlock:^(NSNotification *note) { usingBlock:^(NSNotification *note) {
[self.parentViewController performSegueWithIdentifier:@"slideShowSegue" sender:self]; // if (NSClassFromString(@"NSLayoutConstraint"))
// // support autolayout, this tablevc has a parent_vc which has this segue
// [self.parentViewController performSegueWithIdentifier:@"slideShowSegue" sender:self];
// else
[self performSegueWithIdentifier:@"slideShowSegue" sender:self];
}]; }];
[super viewDidAppear:animated]; [super viewDidAppear:animated];
} }
......
...@@ -52,11 +52,11 @@ dispatch_queue_t backgroundQueue; ...@@ -52,11 +52,11 @@ dispatch_queue_t backgroundQueue;
- (void) viewDidAppear:(BOOL)animated - (void) viewDidAppear:(BOOL)animated
{ {
[self changeStartButtonIconForButton:nil]; [self changeStartButtonIconForButton:nil];
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:self.slideshow.currentSlide NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.slideshow.currentSlide
inSection:1]; inSection:1];
[self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; [self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
[[[self.tableView cellForRowAtIndexPath:indexPath] viewWithTag:2] setBackgroundColor:[UIColor lightGrayColor]]; // [[[self.tableView cellForRowAtIndexPath:indexPath] viewWithTag:2] setBackgroundColor:[UIColor lightGrayColor]];
} }
- (void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender - (void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender
...@@ -114,6 +114,11 @@ dispatch_queue_t backgroundQueue; ...@@ -114,6 +114,11 @@ dispatch_queue_t backgroundQueue;
return nil; return nil;
} }
- (void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier: @"sw_customized_segue" sender: [tableView cellForRowAtIndexPath: indexPath]];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (indexPath.section == 0) { if (indexPath.section == 0) {
...@@ -137,6 +142,16 @@ dispatch_queue_t backgroundQueue; ...@@ -137,6 +142,16 @@ dispatch_queue_t backgroundQueue;
} }
} }
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
// Otherwise selection will disable background color and make slide number unreadable
if(indexPath.section == 1 && cell.selected){
UILabel *label = (UILabel *)[cell viewWithTag:2];
if ([label backgroundColor]!=[UIColor lightGrayColor]) {
[label setBackgroundColor:[UIColor lightGrayColor]];
}
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (indexPath.section == 0) if (indexPath.section == 0)
...@@ -165,7 +180,7 @@ dispatch_queue_t backgroundQueue; ...@@ -165,7 +180,7 @@ dispatch_queue_t backgroundQueue;
// Format the elapsed time and set it to the label // Format the elapsed time and set it to the label
NSString *timeString = [dateFormatter stringFromDate:timerDate]; NSString *timeString = [dateFormatter stringFromDate:timerDate];
UILabel *l = (UILabel *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]] viewWithTag:1]; UILabel *l = (UILabel *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] viewWithTag:1];
l.text = timeString; l.text = timeString;
} }
...@@ -207,7 +222,7 @@ dispatch_queue_t backgroundQueue; ...@@ -207,7 +222,7 @@ dispatch_queue_t backgroundQueue;
{ {
UIButton * btn = sender; UIButton * btn = sender;
if (!btn) { if (!btn) {
btn = (UIButton *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]] viewWithTag:2]; btn = (UIButton *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] viewWithTag:2];
} }
switch (self.state) { switch (self.state) {
case TIMER_STATE_RUNNING: case TIMER_STATE_RUNNING:
...@@ -231,7 +246,7 @@ dispatch_queue_t backgroundQueue; ...@@ -231,7 +246,7 @@ dispatch_queue_t backgroundQueue;
self.lastInterval = 0; self.lastInterval = 0;
self.state = TIMER_STATE_CLEARED; self.state = TIMER_STATE_CLEARED;
UIButton *l = (UIButton *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]] viewWithTag:2]; UIButton *l = (UIButton *)[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] viewWithTag:2];
[l setImage:[UIImage imageNamed:@"timer_start_btn"] forState:UIControlStateNormal]; [l setImage:[UIImage imageNamed:@"timer_start_btn"] forState:UIControlStateNormal];
[self updateTimer]; [self updateTimer];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment