0003-NavigationBar-UI-fixes.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From ba32ab79d2a3349f53de7af93b1fca5e581ce505 Mon Sep 17 00:00:00 2001
  2. From: Tobias Conradi <videolan@tobias-conradi.de>
  3. Date: Wed, 29 Apr 2015 22:19:20 +0200
  4. Subject: [PATCH 3/4] NavigationBar UI fixes
  5. ---
  6. src/LiveSDK/Library/Internal/LiveAuthDialog.m | 25 ++++++-------------------
  7. 1 file changed, 6 insertions(+), 19 deletions(-)
  8. diff --git a/src/LiveSDK/Library/Internal/LiveAuthDialog.m b/src/LiveSDK/Library/Internal/LiveAuthDialog.m
  9. index ea3eba2..162085e 100644
  10. --- a/src/LiveSDK/Library/Internal/LiveAuthDialog.m
  11. +++ b/src/LiveSDK/Library/Internal/LiveAuthDialog.m
  12. @@ -75,25 +75,12 @@
  13. [super viewDidLoad];
  14. self.webView.delegate = self;
  15. -
  16. - // Override the left button to show a back button
  17. - // which is used to dismiss the modal view
  18. - UIImage *buttonImage = [LiveAuthHelper getBackButtonImage];
  19. - //create the button and assign the image
  20. - UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  21. - [button setImage:buttonImage
  22. - forState:UIControlStateNormal];
  23. - //set the frame of the button to the size of the image
  24. - button.frame = CGRectMake(0, 0, buttonImage.size.width, buttonImage.size.height);
  25. -
  26. - [button addTarget:self
  27. - action:@selector(dismissView:)
  28. - forControlEvents:UIControlEventTouchUpInside];
  29. -
  30. - //create a UIBarButtonItem with the button as a custom view
  31. - self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc]
  32. - initWithCustomView:button]autorelease];
  33. -
  34. +
  35. + UIBarButtonItem *dismissBarButton = [[[UIBarButtonItem alloc]
  36. + initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
  37. + target:self action:@selector(dismissView:)]autorelease];
  38. + self.navigationItem.leftBarButtonItem = dismissBarButton;
  39. +
  40. //Load the Url request in the UIWebView.
  41. NSURLRequest *requestObj = [NSURLRequest requestWithURL:_startUrl];
  42. [webView loadRequest:requestObj];
  43. --
  44. 2.6.1