Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
iOS: Changed iOS target version back to iOS 6.0. Added version checks…
… for iOS 7. Several bug fixes in XIB files for iPad.
  • Loading branch information
ycastonguay committed Nov 11, 2013
1 parent 21e1965 commit e521307
Show file tree
Hide file tree
Showing 21 changed files with 501 additions and 2,316 deletions.
7 changes: 5 additions & 2 deletions MPfm/MPfm.iOS/Classes/Controllers/AboutViewController.cs
Expand Up @@ -36,8 +36,11 @@ public AboutViewController()

public override void ViewDidLoad()
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
Expand Up @@ -36,8 +36,11 @@ public AudioPreferencesViewController()

public override void ViewDidLoad()
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
6 changes: 5 additions & 1 deletion MPfm/MPfm.iOS/Classes/Controllers/Base/BaseViewController.cs
Expand Up @@ -69,7 +69,11 @@ public override void ViewDidDisappear(bool animated)

public override void ViewDidLoad()
{
EdgesForExtendedLayout = UIRectEdge.None;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
EdgesForExtendedLayout = UIRectEdge.None;
}

base.ViewDidLoad();
this.NavigationItem.SetHidesBackButton(true, true);
}
Expand Down
Expand Up @@ -117,8 +117,11 @@ public override void ViewDidLoad()
for(int a = 0; a < 18; a++)
AddFaderToScrollView(a.ToString() + ".0 kHz");

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
Expand Up @@ -36,8 +36,11 @@ public GeneralPreferencesViewController()

public override void ViewDidLoad()
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
Expand Up @@ -37,8 +37,11 @@ public LibraryPreferencesViewController()

public override void ViewDidLoad()
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

btnResetLibrary.SetImage(UIImage.FromBundle("Images/Buttons/reset"));
btnUpdateLibrary.SetImage(UIImage.FromBundle("Images/Buttons/refresh"));
Expand Down
Expand Up @@ -115,8 +115,11 @@ public override void ViewDidLoad()
longPressCollectionView.WeakDelegate = this;
collectionView.AddGestureRecognizer(longPressCollectionView);

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 45 additions & 45 deletions MPfm/MPfm.iOS/Classes/Controllers/PlayerViewController.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -44,8 +44,11 @@ public override void ViewDidLoad()
tableView.WeakDataSource = this;
tableView.WeakDelegate = this;

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
7 changes: 5 additions & 2 deletions MPfm/MPfm.iOS/Classes/Controllers/SyncMenuViewController.cs
Expand Up @@ -82,8 +82,11 @@ public override void ViewDidLoad()
viewSync.Hidden = true;
tableView.Hidden = true;

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
7 changes: 5 additions & 2 deletions MPfm/MPfm.iOS/Classes/Controllers/SyncViewController.cs
Expand Up @@ -51,8 +51,11 @@ public override void ViewDidLoad()

btnConnectDeviceManually.SetImage(UIImage.FromBundle("Images/Buttons/connect"));

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
Expand Up @@ -39,8 +39,11 @@ public override void ViewDidLoad()
{
this.View.BackgroundColor = GlobalTheme.BackgroundColor;

NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
{
NavigationController.InteractivePopGestureRecognizer.WeakDelegate = this;
NavigationController.InteractivePopGestureRecognizer.Enabled = true;
}

base.ViewDidLoad();

Expand Down
12 changes: 6 additions & 6 deletions MPfm/MPfm.iOS/Classes/Delegates/AppDelegate.cs
Expand Up @@ -74,12 +74,9 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent;

_window = new MPfmWindow(UIScreen.MainScreen.Bounds);
_window.TintColor = GlobalTheme.SecondaryColor;

// // Create tab bar controller, but hide it while the splash screen is visible
// _tabBarController = new MainViewController();
// _tabBarController.View.Hidden = true;
// _window.RootViewController = _tabBarController;
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
_window.TintColor = GlobalTheme.SecondaryColor;

// Start navigation manager
_navigationManager = (iOSNavigationManager)container.Resolve<MobileNavigationManager>();
Expand Down Expand Up @@ -232,7 +229,10 @@ public void PushDialogView(MobileDialogPresentationType presentationType, string
case MobileDialogPresentationType.Standard:
var navCtrl = new MPfmNavigationController(MobileNavigationTabType.More); // TODO: Remove tab type
navCtrl.SetTitle(viewTitle, "");
navCtrl.NavigationBar.TintColor = UIColor.FromRGBA(0.2f, 0.2f, 0.2f, 1);
if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
navCtrl.NavigationBar.TintColor = UIColor.FromRGBA(0.2f, 0.2f, 0.2f, 1);
navCtrl.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
navCtrl.ModalInPopover = true;
navCtrl.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
Expand Down
2 changes: 1 addition & 1 deletion MPfm/MPfm.iOS/Classes/Services/iOSDropboxService.cs
Expand Up @@ -201,7 +201,7 @@ public string PushDeviceInfo(AudioFile audioFile, long positionBytes, string pos
}
catch (Exception ex)
{
Tracing.Log("iOSDropboxService - PushNowPlaying - Exception: {0}", ex);
Tracing.Log("iOSDropboxService - PushDeviceInfo - Exception: {0}", ex);
throw;
}
finally
Expand Down
2 changes: 1 addition & 1 deletion MPfm/MPfm.iOS/Info.plist
Expand Up @@ -16,7 +16,7 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>7.0</string>
<string>6.0</string>
<key>UIAppFonts</key>
<array>
<string>Fonts/Junction.otf</string>
Expand Down

0 comments on commit e521307

Please sign in to comment.