Skip to content

Commit

Permalink
iOS: Several bug fixes and optimizations for Artist cells in MobileLi…
Browse files Browse the repository at this point in the history
…braryBrowserViewController. More bug fixes for iOS 7.

Related to issue #405.
  • Loading branch information
ycastonguay committed Oct 9, 2013
1 parent e215e19 commit f0065cd
Show file tree
Hide file tree
Showing 18 changed files with 572 additions and 722 deletions.
2 changes: 1 addition & 1 deletion MPfm/MPfm.MVP/Presenters/SelectPlaylistPresenter.cs
Expand Up @@ -135,7 +135,7 @@ private void AddNewPlaylist()
try
{
var view = _mobileNavigationManager.CreateAddPlaylistView();
_mobileNavigationManager.PushDialogView(MobileDialogPresentationType.Standard, "Add New Playlist", View, view);
_mobileNavigationManager.PushDialogView(MobileDialogPresentationType.Overlay, "Add New Playlist", View, view);
}
catch (Exception ex)
{
Expand Down
32 changes: 32 additions & 0 deletions MPfm/MPfm.iOS/Classes/Controllers/AddPlaylistViewController.cs
Expand Up @@ -33,15 +33,47 @@ public AddPlaylistViewController(Action<IBaseView> onViewReady)

public override void ViewDidLoad()
{
// Make sure the Done key closes the keyboard
txtPlaylistName.ShouldReturn = (a) => {
txtPlaylistName.ResignFirstResponder();
return true;
};

base.ViewDidLoad();
}

private void CloseDialog()
{
WillMoveToParentViewController(null);
UIView.Animate(0.2f, () => {
this.View.Alpha = 0;
}, () => {
View.RemoveFromSuperview();
RemoveFromParentViewController();
});
}

partial void actionCancel(NSObject sender)
{
CloseDialog();
}

partial void actionCreate(NSObject sender)
{
OnSavePlaylist(txtPlaylistName.Text);
CloseDialog();
}

#region IAddPlaylistView implementation

public Action<string> OnSavePlaylist { get; set; }

public void AddPlaylistError(Exception ex)
{
InvokeOnMainThread(() => {
var alertView = new UIAlertView("AddPlaylist Error", ex.Message, null, "OK", null);
alertView.Show();
});
}

#endregion
Expand Down

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

Expand Up @@ -92,14 +92,14 @@ public override void ViewDidLoad()
var btnReset = new MPfmButton();
btnReset.SetTitle("Reset", UIControlState.Normal);
btnReset.Font = UIFont.FromName("HelveticaNeue", 12.0f);
btnReset.Frame = new RectangleF(0, 12, 60, 30);
btnReset.Frame = new RectangleF(0, 12, 60, 40);
btnReset.TouchUpInside += HandleButtonResetTouchUpInside;
_btnReset = new UIBarButtonItem(btnReset);

var btnNormalize = new MPfmButton();
btnNormalize.SetTitle("Normalize", UIControlState.Normal);
btnNormalize.Font = UIFont.FromName("HelveticaNeue", 12.0f);
btnNormalize.Frame = new RectangleF(0, 12, 80, 30);
btnNormalize.Frame = new RectangleF(0, 12, 80, 40);
btnNormalize.TouchUpInside += HandleButtonNormalizeTouchUpInside;
_btnNormalize = new UIBarButtonItem(btnNormalize);

Expand Down
Expand Up @@ -178,6 +178,7 @@ public UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
cell.TextLabel.Text = _presets[indexPath.Row].Name;
cell.TextLabel.Font = UIFont.FromName("HelveticaNeue-Light", 16);
cell.TextLabel.TextColor = UIColor.Black;
cell.TextLabel.HighlightedTextColor = UIColor.White;
cell.Accessory = UITableViewCellAccessory.None;
cell.SelectionStyle = UITableViewCellSelectionStyle.Gray;

Expand Down

0 comments on commit f0065cd

Please sign in to comment.