Tags down


Swift UIActivityView stopAnimating() not working

By : Norbert Marcinkiewic
Date : October 16 2020, 03:08 PM
Hope this helps There are a few problems with your code. The biggest one is that you've made activityIndicator a computed property. Each time you reference it, your closure code is executed and you get a new, never-before-seen activity indicator. Try this code as a test:
code :
print(String(format: "activityIndicator address = %X", activityIndicator))
print(String(format: "activityIndicator address = %X", activityIndicator))
print(String(format: "activityIndicator address = %X", activityIndicator))
lazy var activityIndicator: UIActivityIndicatorView = {
    let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .white)
    activityIndicator.hidesWhenStopped = true
    activityIndicator.center = CGPoint(x: self.frame.width/2, y: self.frame.height/2)
    return activityIndicator

Share : facebook icon twitter icon

how can i know when the NSXmlParser End Parsing for StopAnimating The UIActivityIndicatorView?

By : user2551282
Date : March 29 2020, 07:55 AM
To fix the issue you can do -[NSXMLParser parse] is a synchronous call. As soon as the parser returns from -parse, it has finished parsing.

Weird but simple to understand bug... UIActivityIndicatorView stopAnimating is not working

By : Edin Abazi
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Because you're using a computed property, not a lazy property, so each time you call self.composeBarView you're creating a new instance. Your code uses the passed view to start animating, but to stop animating you're always creating a new view which obviously hasn't been displayed yet.
Change your code to:
code :
lazy var composeBarView: PHFComposeBarView = {
    var viewBounds = self.view
    var frame = CGRectMake(0, viewBounds.frame.height - PHFComposeBarViewInitialHeight, viewBounds.frame.width, PHFComposeBarViewInitialHeight)

    var composeBarView = PHFComposeBarView(frame: frame)

    composeBarView.maxLinesCount = 6
    composeBarView.placeholder = "Write some text"
    composeBarView.buttonTitle = "Reply"
    composeBarView.delegate = self

    composeBarView.textView.backgroundColor = UIColor.whiteColor()

    return composeBarView

stopAnimating activity indicator from app delegate

By : Jim.Gu
Date : March 29 2020, 07:55 AM
Hope that helps I am having troubles stopping an activity indicator from a function in my app delegate, i know the function is getting called but i do not recieve any errors in my log. , When you do:
code :
let vc = (GIDSignIn.sharedInstance().uiDelegate as! SignInViewController)

Swift - stopAnimating() - must be used from main thread only

By : user2807162
Date : March 29 2020, 07:55 AM
To fix this issue You can do big task in default background queue, and when the big task completes then simply get the main queue and perfom any UI Updates.
code :
override func viewDidLoad() {


   DispatchQueue.global().async {

      DispatchQueue.main.async {


UIActivityIndicator stopAnimating() not working

By : Марат Кандагалов
Date : March 29 2020, 07:55 AM
may help you . In my SignInViewController i have this code that adds the activity when a button is clicked and in my app delegate i run the stopanimating function when a fuction has finished, i know the function is running as i can get it to print out something but the activity indicator is not dissapearing , Try calling stopanimating() on main thread.
Related Posts Related Posts :
  • iOS 11 disable key flicks programmatically
  • How i can check if user switched iCloud account?
  • Text line in UITextView is cut the middle
  • ios URLSessionDataTask use resume with Data
  • iOS swift: scrollview does not call didscrolltotop
  • Can iOS device detect Eddystone beacon when app is killed/suspended?
  • WKWebView vs UIWebView
  • self invocations in computed property
  • Swift 3 - AdMob not showing on existing View Controllers
  • (Swift) moving objects while iterating over array
  • UIDocumentPickerViewController files disabled?
  • Swift call IBAction method not working
  • Swift: UIBarButtonItem only calls action to display UIImagePickerController's interface by holding down the button
  • CLLocationManager `didUpdateToLocation` not called when app is terminated
  • add some UITextView s and other elements in UIScrollView programmatically Xamarin IOS
  • UIView Shadow using BezierPath massively offsets the shadow
  • What's happening behind the scenes in XCTest's @testable?
  • How do I detect a non-programmatic disconnection from the MCSession of the current device?
  • How to read data out of the Health app in the iOS 11 Simulator
  • How to perform a segue only if a condition is true
  • What is the equivalent of the Visual Basic "Mid" function in Swift 4?
  • Skipped installing .framework binary due to the error
  • crashing when no image is uploaded to Firebase
  • Is it possible to run different Erlang OTP version at the same time?
  • Swift - Parse array in nested JSON Object not working
  • Can we bootstrap Crashlytics on a background thread on iOS?
  • what is the most efficient to save and load a list of static strings
  • How can I load different api keys based on a current schema in Objective C/iOS development?
  • UIAlertController shows blank titles of UIAlertActions
  • Swift 4 Decodable, DecodingError : No value associated with key
  • Programmatic generation of MDLMesh objects using initWithVertexBuffers
  • Need to implement 3D touch on App icon similar to recent contacts
  • Record audio and send it to server in Swift 3
  • Reset current page number in label
  • Swift getting array of Item objects using Alamofire
  • Messaging Notification is not displaying in background or not running app state
  • Swift 4 Decodable: The given data was not valid JSON
  • Right way to sync a variable with UserDefaults
  • iOS explanation BLE data and bytes swift 3
  • iOS Core Data Merge Policy - NSMergeByPropertyStoreTrumpMergePolicy
  • why am I not getting the correct URL path in swift OSX
  • Adding table to navigation controller view programatically doesnt work
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com