From 1847053b76c9d2f67d888690d3344dbccdf6c664 Mon Sep 17 00:00:00 2001 From: Oleg Demchenko Date: Tue, 24 Sep 2013 22:22:00 +0400 Subject: [PATCH] [Paint] Changed condition for y position change. Fix bug [14631] --- PaintCode/PaintCodeDemo/BlueButton/BlueButtonViewController.cs | 2 +- .../PaintCodeDemo/GlossyButton/GlossyButtonViewController.cs | 2 +- PaintCode/PaintCodeDemo/LineArt/DrawingViewController.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PaintCode/PaintCodeDemo/BlueButton/BlueButtonViewController.cs b/PaintCode/PaintCodeDemo/BlueButton/BlueButtonViewController.cs index 4b97d06f..c0cf35b5 100644 --- a/PaintCode/PaintCodeDemo/BlueButton/BlueButtonViewController.cs +++ b/PaintCode/PaintCodeDemo/BlueButton/BlueButtonViewController.cs @@ -19,7 +19,7 @@ namespace PaintCode View.BackgroundColor = UIColor.White; - float statusBarHeight = UIDevice.CurrentDevice.SystemVersion == "7.0" ? + float statusBarHeight = float.Parse(UIDevice.CurrentDevice.SystemVersion) >= 7 ? UIApplication.SharedApplication.StatusBarFrame.Height : 0f; button = new BlueButton (new RectangleF (10, 10 + statusBarHeight, 120, 120 - statusBarHeight)); diff --git a/PaintCode/PaintCodeDemo/GlossyButton/GlossyButtonViewController.cs b/PaintCode/PaintCodeDemo/GlossyButton/GlossyButtonViewController.cs index 80afa8be..73d9aeb1 100644 --- a/PaintCode/PaintCodeDemo/GlossyButton/GlossyButtonViewController.cs +++ b/PaintCode/PaintCodeDemo/GlossyButton/GlossyButtonViewController.cs @@ -19,7 +19,7 @@ namespace PaintCode View.BackgroundColor = UIColor.White; - float statusBarHeight = UIDevice.CurrentDevice.SystemVersion == "7.0" ? + float statusBarHeight = float.Parse(UIDevice.CurrentDevice.SystemVersion) >= 7 ? UIApplication.SharedApplication.StatusBarFrame.Height : 0f; button = new GlossyButton (new RectangleF (30, 30 + statusBarHeight, 130, 38)); button.SetTitle ("Stop!", UIControlState.Normal); diff --git a/PaintCode/PaintCodeDemo/LineArt/DrawingViewController.cs b/PaintCode/PaintCodeDemo/LineArt/DrawingViewController.cs index c861425c..f4997701 100644 --- a/PaintCode/PaintCodeDemo/LineArt/DrawingViewController.cs +++ b/PaintCode/PaintCodeDemo/LineArt/DrawingViewController.cs @@ -21,7 +21,7 @@ namespace PaintCode View.BackgroundColor = UIColor.White; drawing = new DrawingView (); - float statusBarHeight = UIDevice.CurrentDevice.SystemVersion == "7.0" ? + float statusBarHeight = float.Parse(UIDevice.CurrentDevice.SystemVersion) >= 7 ? UIApplication.SharedApplication.StatusBarFrame.Height : 0f; drawing.Frame = new System.Drawing.RectangleF (0, statusBarHeight, 320, 640 - statusBarHeight);