Coder Social home page Coder Social logo

btprogresshud's People

Contributors

ansuria avatar aritchie avatar ayonab avatar cheesebaron avatar danmiser avatar dannycabrera avatar filipnavara avatar geirsagberg avatar ghigh avatar gshackles avatar kevinvdburg avatar marcoburato-ecutek avatar martijn00 avatar matt4pi avatar mloenow avatar nicwise avatar orand avatar ravensorb avatar redth avatar robert-waggott avatar sungolo avatar vackup avatar yinyue200 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btprogresshud's Issues

iOS 11: Cancel not working

Cancel button on BTProgressHUD.Show() does not work. The dialog does not disappear when tap. (Or cannot tap the button.)

  • iOS 11.0
  • Xamarin.iOS: Version 11.0.0.0
  • BTProgressHUD: ver. 1.2.0.5

.Show() doesn't respect MaskType

When doing:

ProgressHUD.Shared.Show("Loading...", -1, ProgressHUD.MaskType.None, 0.75);

I still get this:
screen shot 2013-11-26 at 5 31 53 pm

and no matter which MaskType I use, it's always the same result.

I just noticed though that if I go away from that tab and come back again (triggering viewDidAppear again) the HUD respects the passed MaskType. (Tried on device with two different MaskTypes to be sure)

So on initial load it's always using a translucent black modal and the second time it's triggered it uses the proper passed MaskType.

Enhancement suggestion

Hey @nicwise , modified a few things and did not submit a pull request. Wanted your opinion on the enhancement. Basically added an extra parameter to ShowContinuousProgress that accepts a UIImage which is then displayed within the ring. Let me know your thoughts.

MakeButton("Show Continuous Progress with Image", () =>
{
       ProgressHUD.Shared.Ring.Color = UIColor.Green;
       ProgressHUD.Shared.ShowContinuousProgress("Continuous progress...", ProgressHUD.MaskType.None, 1000, UIImage.FromBundle("[email protected]"));
       KillAfter(3);
});


Preview:

showprogresswithimage

OSX Mavericks linker issue.

Hey, I got an issue with I believe the linker when using OSX Mavericks, but not 100% sure though. At the moment my app won't run in release mode on the device, but will run fine in debug mode when I use BTProgressHUD.
When I comment out the lines that I use BTProgressHUD with the app will run fine in release mode.

Not sure if it was the upgrade to OSX Mavericks, something in BTProgressHUD, the switch to the alpha stream or something odd in iOS 7.0.3.

Have also made an identical thread on Xamarin forums.

http://forums.xamarin.com/discussion/9437/osx-mavericks-and-xamarin-ios-linker?new=1

Any thoughts or ideas of what I should try next?

Doesn't supports .net standard 2.0

Hello,
Any chance to add support for .net standard 2.0?

I have this issue:
Severity Code Description Project File Line Suppression State
Error NU1202 Package BTProgressHUD 1.2.0.2 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package BTProgressHUD 1.2.0.2 supports:

  • monotouch (MonoTouch,Version=v0.0)
  • xamarinios10 (Xamarin.iOS,Version=v1.0) app1 1

Icon not showing

I am using v1.2.0.6 on iOS Simulator :iPhone 6, iOS 8.1
The Progress, Success, and Error icon is not showing. Only the continuous icon is showing.
I am called the HUD methods from Xamarin.Forms App, using dependency services.

Cancel button overlaps progress image without status text

I want to show the progress image and a Cancel button, but no status message. But the Cancel text overlaps the image. It can easily be reproduced in your BTProgressHUDDemo when you change the status text to null in MainViewController.ViewDidLoad:

        MakeButton("Cancel problem", () =>
            BTProgressHUD.Show("Cancel", () => KillAfter(), null)
            //BTProgressHUD.Show("Cancel", () => KillAfter(), "This is a multilinetext\nSome more text\n more text\n and again more text")
        );

This code brings up a HUD like this:

image

Crash when calling Dismiss

I am trying to use this in an iOS application. With the following code, the application crashes. The crash is a NullReferenceException in the component.

    public void ShowProgressAlert(string message, Action action)
    {
        InvokeOnMainThread (() => BTProgressHUD.Show(message, -1, ProgressHUD.MaskType.Gradient));
        action ();
        DismissProgressAlert ();
    }

    public void DismissProgressAlert()
    {
        InvokeOnMainThread (() =>
            {
                if (BTProgressHUD.IsVisible)
                    BTProgressHUD.Dismiss ();
            });
    }

This is running on the iOS simulator 'iPhone Retina (4-inch) / iOS 7.1. I am using version 1.10 from the Xamarin Component store.

When BTProgressHUD is used togheter with CRSAlertView, it stops showing

Hi! I've found an issue. When you use BTProgressHUD togheter with CRSAlertView, it stops showing.

The issue is in ProgressHUD.cs, method void ShowProgressWorker (float progress = -1, string status = null, MaskType maskType = MaskType.None, bool textOnly = false, ToastPosition toastPosition = ToastPosition.Center, string cancelCaption = null, Action cancelCallback = null, double timeoutMs = 1000, bool showContinuousProgress = false, UIImage displayContinuousImage = null)

In this code

            foreach (UIWindow window in windows) {
                    if (window.WindowLevel == UIWindowLevel.Normal && !window.Hidden) {
                        window.AddSubview (OverlayView);
                        break;
                    }
                }

The issue is because CRSAlertView adds a new window, so in addttion to window.WindowLevel == UIWindowLevel.Normal && !window.Hidden, we must check is is IsKeyWindow, eg: I replaced that code with this:

var window = windows.FirstOrDefault(w => w.WindowLevel == UIWindowLevel.Normal && !w.Hidden && w.IsKeyWindow);
                if (window == null)
                {
                    throw new Exception("Can't find a visible key window to add the subview");
                }

                window.AddSubview(OverlayView);

Setting mask type when not using spinner

I'm currently using 1.0.0 from NuGet.

I am wondering if there is a way to set the mask when you are not just showing the spinner? i.e showing an Error.

Also I don't seem to be seeing the cross when displaying an error, on iOS 9.2, just a blank space below the text I am using as the status.

Any help would be great, thanks.

Crash at init on iOS 7

Just start the demo app on an iOS 7 device, it will crash at startup.

This is due to #41 which added static fields initialized with Class used in keyboard detection. Some of those have been introduced by iOS8, and as there is no the system version check, it result in fatal exception on iOS 7.

Crashes on iOS 12 or older devices

๐Ÿ› Bug Report

Crashes on older iOS devices because of the use of iOS Semantic Colors (SystemBackgroundColor, LabelColor etc.). There should be a checking of iOS version.

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[UIColor systemBackgroundColor]: unrecognized selector sent to class 0x11ac07ec0

Reproduction steps

Update to latest version, use ProgesssHUD and run on any iOS 12 or below simulator or device

Configuration

Visual Studio for Mac
Xamarin.iOS

Version: 1.3.0

Platform:

  • ๐Ÿ“ฑ iOS

Can't Show Hud from ViewDidLoad() method

I'm trying to call BTProgressHUD.Show("Loading",-1,BTProgressHUD.MaskType.Gradient);
from ViewDidLoad() method but unfortunately receive the following error:

Could you please confirm that this is an issue?

iOS 15 still crashes intermittently

๐Ÿ› Bug Report

Attempting to display an iOS UIAlertView whilst a BTProgressHUD is still showing a spinner intermittently causes a crash.

โ“ Expected behavior

Dialog to be displayed, with the ability to either dismiss the spinner before or after the UIAlertView is on screen.

๐Ÿชœ Reproduction steps

Display a progress spinner

BTProgressHUD.Show(message, -1, MaskType.Black);

Display a system dialog

UIAlertView avAlert = new UIAlertView(title, message, null, "OK", null);
avAlert.Show();

Try to dismiss the HUD after the Alert View is present

BTProgressHUD.Dismiss();

This often causes the crash.

๐Ÿ›  Configuration

I would have said BTProgressHUD directly, however I discovered the 3rd party package ACR.UserDialogs in my installed NuGets, so I've removed that NuGet and it's still crashing.

๐Ÿ“ฆ Package Version: 1.3.5

๐Ÿ“ฑ iOS Version: iOS 15.5 Public Beta 3

๐Ÿ’ฅ Crash log:

MyProject 2022-05-04T22:10:59Z  UI  1 - IosPlatformDifferences - Display Message 'The pin does not match'

2022-05-04 23:11:06.324 MyProject.iOS[16396:1424514] [AppCenterCrashes] ERROR: +[MSACWrapperLogger MSACWrapperLog:tag:level:]/10 Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at BigTed.ProgressHUD.PositionHUD (Foundation.NSNotification notification) [0x000cf] in /_/BTProgressHUD/ProgressHUD.cs:872 
  at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSNotificationCenter.cs:48 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:75 
  at MyProject.iOS.Application.Main (System.String[] args) [0x00001] in /Users/rob/GitHub/hillingar-MyProject-appv2/app/MyProject/MyProject.iOS/Main.cs:16 

2022-05-04 23:11:06.341 MyProject.iOS[16396:1424514] Unhandled managed exception: Object reference not set to an instance of an object (System.NullReferenceException)
  at BigTed.ProgressHUD.PositionHUD (Foundation.NSNotification notification) [0x000cf] in /_/BTProgressHUD/ProgressHUD.cs:872 
  at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSNotificationCenter.cs:48 
  at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:75 
  at MyProject.iOS.Application.Main (System.String[] args) [0x00001] in /Users/rob/GitHub/hillingar-MyProject-appv2/app/MyProject/MyProject.iOS/Main.cs:16 

๐Ÿคท๐Ÿปโ€โ™‚๏ธ Workaround:

For some reason forcing a BTProgressHUD.Dismiss prior to display a system alert isn't enough on its own, however, delaying the alert by taking it off and back on the UI thread seems to do the trick ๐Ÿค” However, usually I can display a popup whilst the spinner is still going.

        public override void DisplayMessage(string title, string message)
        {
            Device.BeginInvokeOnMainThread(() =>
            {
                Logger.Log(this, $"Display Message '{message}'");
                BTProgressHUD.Dismiss();
                Task.Delay(25).ContinueWith((t) =>
                {
                    Device.BeginInvokeOnMainThread(() =>
                    {
                        UIAlertView avAlert = new UIAlertView(title, message, null, "OK", null);
                        avAlert.Show();
                    });
                });
            });
        }

Alternatively switching from UIAlertView to Xamarin Forms own DisplayAlert works without the hacky delays.

        public override void DisplayMessage(string title, string message)
        {
            Device.BeginInvokeOnMainThread(() =>
            {
                Logger.Log(this, $"Display Message '{message}'");
                PageManager.getMainPage().DisplayAlert(title, message, "OK");
            });
        }

ShowErrorWithStatus doesnot work

Hi when I show error message on a view which is pushed as popup view then its showing and quickly dispersing. Even though I pass 4000 or any time it just comes and goes.

To open popup view:
await Navigation.PushModalAsync(new PopupPage());

I am using below code to show error message:
BTProgressHUD.ShowErrorWithStatus("please enter text",4000);

However, it works nice on non popup view.

Please suggest

Xamarin Forms : Acr userdialog loading indicator not showing in Center

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • iOS
  • [] Android
  • [] UWP
  • NET Standard 2.0

Version of OS(s) listed above with issue (if android - please include version of Xamarin.Android.Support.* you are using)

Microsoft Visual Studio Professional 2017
Version 15.9.12
VisualStudio.15.Release/15.9.12+28307.665
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Professional

Xamarin 4.12.3.83 (d15-9@23fa80172)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.16.30 (e0af99a34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 1.1.128 (6f5ebb2)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.1.7.0 (HEAD/ba9da7a76)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 12.4.0.64 (9c8d8e0)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Version of ACR UserDialogs Library

Acr.UserDialogs - 7.0.4

Expected Behaviour

UserDialogs always in the center of the device screen.

Actual Behavior

Acr userdialog loading indicator not showing in Center.

Code of Conduct

Please find the sample application and screen shot.
IMG_1971
Loader.zip

Disable Back Button behavior in Navigation controller

Hi Friends,
its a great library.
i have one issue like when i use BTProgressHUD.show(), it will show me the Progress HUD in Whole navigation controller. so, it disable Whole controller with navigation back button behavior for pop the view controller.

if Progress HUD add in the UIViewController then it solves my issue i think.
is it possible to add BTProgressHUD in UIViewController?

Calling Dismiss() and immediately Show() again

If I call Dismiss() and right after that call Show() again, the HUD does not show up. The problem seems to be the animation that starts in DismissWorker(): if Show() is called before the animation ends, the animation will still complete and thus hide the HUD right after it is shown.

I believe that a fix would be to stop the current animation in Show(), by calling Animate() with the flag UIViewAnimationOptions.BeginFromCurrentState.

Release 1.3.4 seems to break Acr.UserDialogs

๐Ÿ› Bug Report

Hello everybody.

Not sure about this bug but I'm going to open this issue just in the case someone else incurs in the same problem. Moreover, as you can read below, may be that the issue is related to Acr.UserDialogs but because of that project is on lockdown, it would help me to know if the compatibility between the twos may be restored.

It looks like that after updating BTProgressHUD from v. 1.3.3. to v. 1.3.4 in a project that also is using Acr.UserDialogs (last version 7.1.0.514 - this project is on lockdown), an exception is thrown when invoking method Acr.UserDialogs.IUserDialogs.ShowLoading(string).

Unfortunately, inspecting the exception does not help: there is no stack trace and the exception message is "Unable to load type."

PLEASE NOTE: I'm still investigating this issue and I will be back in case of new information and tests.

โ“ Expected behavior

Calling Acr.UserDialogs.IUserDialogs.ShowLoading(string) should display a waiting dialog.

Reproduction steps

None in particular. This behavior happens always, as far as I call ShowLoading(string).

๐Ÿ“ฆ Package Version: 1.3.4
Reverting BTProgressHUD to v. 1.3.3 solves the issue.

๐Ÿ“ฑ iOS Version: Simulator, v. 14.5

BTProgressHUD.Show() from background thread causes UIKitThreadAccessException in debug builds

I just got the exception below:

at Reply.CnhApp.Gui.ViewModels.BaseViewModel.ShowProgressDialog () [0x00018] in /Users/danieleardissone/Documents/XamarinProjects/Cnh/IlSocio/cnh_plm_mobile.git/Gui/Core/ViewModels/BaseViewModel.cs:254 
  at Reply.CnhApp.Gui.ViewModels.BaseViewModel+<ShowLoadingForLongOperationAsync>c__async0`1[System.Boolean].MoveNext () [0x000ad] in /Users/danieleardissone/Documents/XamarinProjects/Cnh/IlSocio/cnh_plm_mobile.git/Gui/Core/ViewModels/BaseViewModel.cs:283 
UIKit.UIKitThreadAccessException: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread.
  at UIKit.UIApplication.EnsureUIThread () [0x00023] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:70 
  at UIKit.UIScreen.get_MainScreen () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/build/native/UIKit/UIScreen.g.cs:318 
  at BigTed.ProgressHUD.get_Shared () [0x00000] in <filename unknown>:0 
  at BigTed.BTProgressHUD.Show (System.String status, Single progress, MaskType maskType) [0x00000] in <filename unknown>:0 

And it seems to be caused by this line of code, which tries to get the MainScreen instance from a background thread:
https://github.com/nicwise/BTProgressHUD/blob/master/BTProgressHUD/ProgressHUD.cs#L189

Despite it could be easily fixed by wrapping it around an InvokeOnMainThread(), IMHO, ALL the InvokeOnMainThread() should be definitely removed from this component and replaced with just a UIApplication.EnsureUIThread() check... as suggested here: http://tirania.org/monomac/archive/2012/Sep-10.html
it would improve both consistency and efficiency.

When working with gui components, developers are already used to call the InvokeOnMainThread() when they're working in a background thread.
In this way, with a single InvokeOnMainThread() call we can perfom all the gui related operations on all different gui component... eg. show the progressdialog, update a label, populate a combo...

[background thread]
InvokeOnMainThread()
{
   [main thread]
   ProgressHUD.Show();
   TextField.Update();
   Combo.Populate();
   ProgressHUD.Hide();
}
[background thread]

While, delegating the call of the InvokeOnMainThread() to each gui component, would be overkill due to the multiple switches from background thread and main thread...

[background thread]
ProgressHUD.Show();  
    InvokeOnMainThread()
    [main thread]

[background thread]
TextField.Update();
    InvokeOnMainThread()
    [main thread]

[background thread]
Combo.Populate();
    InvokeOnMainThread()
    [main thread]

[background thread]
ProgressHUD.Hide();  
    InvokeOnMainThread()
    [main thread]

[background thread]

Larger Text not working

When the Larger Text is enabled in Settings menu, the Text in the Progress ring doesn't scale up or down. Having this feature would add more value to this product.

iOS 11 - Appearance Changes

Hi,

I have noticed with the new iOS 11 the position of the Toasts have now changed to be in the centre and the the hud are now appear slightly off centred. I was wondering is there any plans to re-adjust this back to the way it used to be?

I was wondering is there also a way that you could add the ability to have the hud appear ontop of any window level?

Many Thanks

MaskType.None doesn't work

MaskType.None doesn't allow the user to interact with the underlying elements. This can be seen in the sample app by tapping the Progress button and then attempting to tap one of the Dismiss buttons while the Progress indicator is showing.

Namespace change makes it inconvenient to use methods in BTProgressHUD static class

Now that the BigTed namespace has been changed to BTProgressHUD, we can no longer do

BTProgressHUD.Show();

Instead, we must use

BTProgressHUD.BTProgressHUD.Show();

Since the whole point of the BTProgressHUD static class was to make it more convenient to display the hud, this feels like a step backwards.

I'm not sure why the namespace was changed, as it breaks compatibility with previous package versions. Assuming there was a good reason, I suggest renaming the BTProgressHUD class to HUD, so we can do:

HUD.Show();

HUD only shows half a second on Dismiss() and not before

Hi, I just starting using Xamarin.iOS and BTProgressHUD.

I understood while looking at older issues that I couldn't call it in viewDidLoad so I tried to prevent doing that error.

Here's my HomeViewController, look for the NOTE in GetPinsAndShowLoading. Why is this happening?

I'll follow up with a gif of what's happening so you can clearly get what's up.

Also, can't I start fetching stuff from my API in ViewDidLoad so it's faster (not waiting for the view to draw) and show your HUD anyways? I guess I could add a static variable to define wether or not it should display your HUD and play with that maybe?

Thanks for checking this out and keep up the good work!

public partial class HomeViewController : UIViewController
{
    #region Properties

    public List<Pin> Pins { get; set; }

    private API API { get; set; }

    private UITableViewController TableViewController { get; set; }

    public delegate bool DoneLoading();
    public DoneLoading OnCallBack { get; set; }

    #endregion

    #region Constructors

    public HomeViewController() : base("HomeViewController", null)
    {
        Title = NSBundle.MainBundle.LocalizedString("Home", "Home");
        TabBarItem.Image = UIImage.FromBundle("first");

        this.API = new API();

        this.TableViewController = new UITableViewController(UITableViewStyle.Plain);
    }

    #endregion

    #region Events

    public override void DidReceiveMemoryWarning()
    {
        // Releases the view if it doesn't have a superview.
        base.DidReceiveMemoryWarning();
    }

    public override void ViewDidLoad()
    {
        base.ViewDidLoad();

        UIRefreshControl refreshControl = new UIRefreshControl();

        refreshControl.ValueChanged += (object sender, EventArgs e) => {
            GetPinsAndShowLoading();
        };

        // adding table view
        TableViewController.TableView = new UITableView(View.Bounds);

        TableViewController.RefreshControl = refreshControl;

        // add subview to view
        Add(TableViewController.TableView);
    }

    public override void viewDidAppear(bool animated)
    {
                // Called in ViewDidAppear as instructed.
        GetPinsAndShowLoading();
    }

    #endregion

    /// <summary>
    /// Simply shows a loading sign and calls API for pins.
    /// </summary>
    public void GetPinsAndShowLoading()
    {
        // NOTE: It's supposed to show the loading now but it only flickers once it hit the .Dismiss();
        // So let's say it loads during 5 seconds, we'll see the HUD only half a second when calling .Dismiss();
        // Why is this happening?
        BTProgressHUD.Show("Loading...");

        // fetching pins and passing callback
        API.GetPins(GetPinsCallback);
    }

    /// <summary>
    /// Callback called once GetPins is done.
    /// </summary>
    /// <param name="pins">List<Pin></param>
    public void GetPinsCallback(List<Pin> pins)
    {
        Pins = pins;

        // use pins as source
        TableViewController.TableView.Source = new PinTableSource(Pins);
        BTProgressHUD.Dismiss();
    }
}

Progress HUD disappears in UIAlertView

I have a UIAlertView which asks the user a question. When the clicked event is filed, I Show() a BTProgressHUD. The dialog shows for about a second and then vanishes. I think this has to do with the UIAlertView closing.

        UIAlertView alert = new UIAlertView();
        alert.Title = "Forgot Your Password?";
        alert.AddButton("No");
        alert.AddButton("Yes");
        alert.AlertViewStyle = UIAlertViewStyle.Default;
        alert.Message = "Are you sure you want to reset your password?";
        alert.Show();

        alert.Clicked += (sender1, ev) => 
        {
            if (ev.ButtonIndex == 1)
            {
                BigTed.BTProgressHUD.Show("Requesting OTP...", maskType: BigTed.BTProgressHUD.MaskType.Gradient);
            } 
        };  

reviving old xmaring project; type BTProgressHUD exists in Acr.UserDialogs

๐Ÿ› Bug Report

(thanks in advance for any help)
Trying to revive an older application that was compiling in the past. The application no longer complies..specifically the iOS project

Expected behavior

application should compile and run

Reproduction steps

no steps to reproduce. errors is: /Users/n/Desktop/Source Code/eP2/mobile/iOS/Renderers/Page/BasePageRenderer.cs(17,17): Error CS0433: The type 'BTProgressHUD' exists in both 'Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'BTProgressHUD, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null' (CS0433)

Configuration

Version: 1.x

Acr.UserDialogs (6.3.1)
BTProgressHUD (1.3.2)

offending code:
BTProgressHUD.ForceiOS6LookAndFeel = true;
BTProgressHUD.Show(null, -1F, ProgressHUD.MaskType.Clear);

Platform:

  • [x ] ๐Ÿ“ฑ iOS
  • ๐Ÿค– Android
  • ๐Ÿ WPF
  • ๐ŸŒŽ UWP
  • ๐ŸŽ MacOS
  • ๐Ÿ“บ tvOS
  • ๐Ÿ’ Xamarin.Forms

Crash: Window.Level not normal

When you are truing to used the progress bar and your top level is not normal.The application will throw an system.null exception

Fix:

 var window = UIApplication.SharedApplication.Windows.FirstOrDefault();
                    if (window == null)
                        return;
                    window.WindowLevel = UIWindowLevel.Normal;

Could you please add this code in show methode

Crash on iOS 15

๐Ÿ› Bug Report

I have an app that im getting a lots of crash reports when the OS is updated to iOS 15.

System.NullReferenceException: Object reference not set to an instance of an object.

Stack trace

BigTed ProgressHUD.<DismissWorker>b__98_2 ()
Foundation NSActionDispatcher.Apply ()
(wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr,intptr,intptr,bool)

Expected behavior

Not to crash

Reproduction steps

I believe that this is happening when the app is launched to do the background fetch and when its done the app crashes.

Configuration

Version: 1.3.3

Platform:

  • ๐Ÿ“ฑ iOS
  • ๐Ÿค– Android
  • ๐Ÿ WPF
  • ๐ŸŒŽ UWP
  • ๐ŸŽ MacOS
  • ๐Ÿ“บ tvOS
  • ๐Ÿ’ Xamarin.Forms

License?

I don't see a license file in your project. Is this open source and if so, under what license?

Object reference not set to an instance of an object

๐Ÿ› Bug Report

at BigTed.ProgressHUD.PositionHUD (Foundation.NSNotification notification) [0x000cf] in //BTProgressHUD/ProgressHUD.cs:872
at BigTed.ProgressHUD.ShowProgressWorker (System.Single progress, System.String status, BigTed.MaskType maskType, System.Boolean textOnly, BigTed.ToastPosition toastPosition, System.String cancelCaption, System.Action cancelCallback, System.Double timeoutMs, System.Boolean showContinuousProgress, UIKit.UIImage displayContinuousImage) [0x001ea] in /
/BTProgressHUD/ProgressHUD.cs:388
at BigTed.ProgressHUD+<>c__DisplayClass97_0.b__0 () [0x00000] in /_/BTProgressHUD/ProgressHUD.cs:185
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/azdo/work/2/s/xamarin-macios/src/Foundation/NSAction.cs:62
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(intptr,intptr,intptr,intptr,bool)
at Foundation.NSObject.InvokeOnMainThread (System.Action action) [0x00007] in /Users/builder/azdo/work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:728
at BigTed.ProgressHUD.Show (System.String status, System.Single progress, BigTed.MaskType maskType, System.Double timeoutMs) [0x0002a] in /
/BTProgressHUD/ProgressHUD.cs:185
at BigTed.BTProgressHUD.Show (System.String status, System.Single progress, BigTed.MaskType maskType) [0x00000] in /
/BTProgressHUD/BTProgressHUD.cs:10

โ“ Expected behavior

๐Ÿชœ Reproduction steps

๐Ÿ›  Configuration

๐Ÿ“ฆ Package Version: 1.3.5

๐Ÿ“ฑ iOS Version: 15.3.1

The progress HUD does not work in extensions

In extensions UIApplication.SharedApplication is not available, thus calling some methods results in crashes. SVProgressHUD, on which BTProgressHUD is based, already has defined mechanisms to overcome this issue.

Using a lot of Memory on App

I was profiling my Xamarin From App and I realize that the ProgressHUD takes a lot of memory. Is there any way to avoid this?

Xamarin Froms 3.1.0.5
Device iPad mini 11.4

screen shot 2018-07-16 at 2 13 06 pm

v 1.3.1 Crash - Xamarin - Targeting 13.2 IOS

We are getting isolated crashes in some view controllers. Code wise, nothing has changed in at least two years on these controllers. At this point we are still trying to track down exactly how it is happening.

ProgressHUD.ShowImageWorker (UIKit.UIImage image, System.String status, System.TimeSpan duration)
ProgressHUD+<>c__DisplayClass26_0.b__0 ()
NSActionDispatcher.Apply ()
(wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr,intptr,intptr,bool)
NSObject.InvokeOnMainThread (System.Action action)
ProgressHUD.ShowImage (UIKit.UIImage image, System.String status, System.Double timeoutMs)
BTProgressHUD.ShowSuccessWithStatus (System.String status, System.Double timeoutMs)
DeleteStoresGridDelegate+<>c__DisplayClass24_0.b__0 ()
NSActionDispatcher.Apply ()
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate)
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)
Application.Main (System.String[] args)

Xamarin component store vs nuget versioning

The current version in Xamarin component store of BTProgressHUD is listed as v1.20, whereas version in nuget is v1.0. I assume this is because it is the first release on nuget so it was called 1.0.

Should it be changed and have both versioning the same number as to keep them both in line with each other. I assume the current nuget version is the same as the component store version (did not check, but I guess it could even just add the nuget package for you) but it is hard to tell with versioning numbers what one is currently the most up to date version.

Progress dialog with wrong colors at the first invocation

Hi Nic,

first of all thanks for your work about BTProgressHUD, it works almost perfect in my Xamarin.Forms app.

I use your component for displaying a progress dialog when synchronizing data from a remote server.
My problem is, that at the first time I invoke the BTProgressHUD with progress information, the
progress circle will be rendered with wrong colors (iOS). The empty circle is then light grey and it will be filled with white color. After that first call, the progress dialog will be displayed correctly for all further calls (an empty white circle that will be filled with blue color).

I'm using the latest version 1.19 of the BTProgressHUD component under iOS 9.2 with the latest stable version of Xamarin 4. The way I invoke the component is like this (I'm using the Xamarin DependencyService to wrap the BTProgressHUD calls):

public void ShowProgressHUD(string text, float progressValue)
{
  BTProgressHUD.Show(text, progressValue, ProgressHUD.MaskType.Black);
}

public void DismissProgressHUD()
{
  BTProgressHUD.Dismiss();
}

Crash in DismissWorker

BTProgressHud might crash in DismissWorker:712 when it fails to locate a RootViewController (and yes my app has one of course).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.