Wednesday, October 28, 2026
HomeiOS Developmentios - add progressview in swiftUI?

ios – add progressview in swiftUI?

[ad_1]

I wish to present/cover progress view in swiftUI globally. I’ve api class for api calling however I wish to present progressview when api calling.. how can I try this

class NetworkManager: NSObject {
    static let shared = NetworkManager()
    
    //MARK:- ======== FETCH API DATA =========
    func fetchAPIData(url:String,
                           isShowHUD:Bool){
    
    headerDic["timezone"] =  TimeZone.present.identifier
    
    if isShowHUD {
         // I wish to present progressview from right here high of the display.
    }
    
        **api calling code.**
         
        }
    }
}

Right here if I move isShowHUD then present progress view on high of the display. if any error or obtained the response then it cover the progressview.

Please assist me on that.how can I obtain in swift ui.I’m in new in swift UI.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments