logo
down
shadow

How to show an UIActivityIndicatorView whitin UITableViewController?


How to show an UIActivityIndicatorView whitin UITableViewController?

Content Index :

How to show an UIActivityIndicatorView whitin UITableViewController?
Tag : ios , By : JoeKaras
Date : November 14 2020, 03:01 PM

This might help you I'm beginner on iOS development and I have an issue about how to show an UIActivityIndicatorView. , Add the progressView directly to the tableView:
private func setupIndicatorView() {
    self.view.addSubview(progressView)
    progressView.center = self.view.center // or instead use autolayout if you prefer it
}

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Adding a UIActivityIndicatorView to a UITableViewController


Tag : iphone , By : Mariocki
Date : March 29 2020, 07:55 AM
it should still fix some issue You can add UIActivityIndicatorView to your tables in the Interface Builder (IB), but a recommended way would be:
User IB to create and customize a UITableViewCell. Put a UIActivityIndicatorView inside this cell. Programmatically load your table cells with the customized UITableViewCell nib file. Programmatically hook up IBOutlets of such UIActivityIndicatorView.

Setting up an UIActivityIndicatorView for the UITableViewController programmatically


Tag : iphone , By : Adrian Codrington
Date : March 29 2020, 07:55 AM
To fix the issue you can do UPDATE for ARC and iOS 5.0+ (I think old version needs to be removed already as we have new, better API's:)):
Add to header .h file of your UIViewController subclass:
 @property (nonatomic, weak) UIActivityIndicator *activityIndicator;
- (void)loadView {
    [super loadView];
    UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    // If you need custom color, use color property
    // activityIndicator.color = yourDesirableColor;
    [self.view addSubview:activityIndicator];
    [activityIndicator startAnimating];
    self.activityIndicator = activityIndicator;
}

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    CGSize viewBounds = self.view.bounds;
    self.activityIndicator.center = CGPointMake(CGRectGetMidX(viewBounds), CGRectGetMidY(viewBounds));
} 
-(void)loadView {
    [super loadView];
    self.activityIndicator = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];
    [self.view addSubview:self.activityIndicator];
    self.activityIndicator.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2);
    [self.activityIndicator startAnimating];
}
@property (nonatomic, assign) UIActivityIndicatorView *activityIndicator;
@synthesize activityIndicator;

UIActivityIndicatorView in a UITableViewController


Tag : ios , By : damomurf
Date : March 29 2020, 07:55 AM
seems to work fine solution is just access the window of your application then attach the activity indicator for it like
 UIWindow *frontWindow = [[UIApplication sharedApplication] keyWindow];
    self.activity.center=frontWindow.center;

    [frontWindow addSubview:self.activity];
    [self.activity startAnimating];

UIActivityIndicatorView in the same hierarchy of UITableView in UITableViewController


Tag : ios , By : can
Date : March 29 2020, 07:55 AM
wish of those help The problem is that with the UIViewController it has a self.view as the root view where you can add any sub-items as you did , put you can't do this at least in IB with UITableViewController as the root view is the table itself
First way

Center a UIActivityIndicatorView for a UITableViewController in the window, not in the table view


Tag : ios , By : nemof
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • How to change the color of seperator in tableView?
  • Is there a better way to watch for a key-value change?
  • How to make UIBezierPath to fill from the center
  • Why on Xcode 11, UICollectionViewCell changes size as soon as you scroll (I already set size in sizeForItem AtIndexPath:
  • How to scan non LE devices using Swift?
  • Unable to infer closure type in the current context in SwiftUI
  • What is the best way to write common code and use it entire project
  • UISegmentedControl inside UIStackView, segments text not centered - iOS 13
  • Swift & ObjC bridge - cannot find protocol declaration for "WKNavigationDelegate"
  • SwiftUI How to push to next screen when tapping on Button
  • 'NSApp' is unavailable in UIKit for Mac: How to embed Mac only framework in iOS app on macOS?
  • UserDefaults Binding with Toggle in SwiftUI
  • How to create a color with an alpha value using SwiftUI?
  • SwiftUI creates destination views before the user navigates to them
  • Streaming video from https with AVPlayer causes initial delay
  • Tap Action not working when Color is clear SwiftUI
  • SwiftUI NavigationButton: How to navigate to different destinations
  • Supported default light/dark mode colors for Color vs UIColor
  • XCUITest wait for a cell with a specific static text inside it
  • Not able to enable Development mode on iOS 13
  • How to hide the home indicator with SwiftUI?
  • How to write if condition with using label text (Int) values
  • Swift Cannot use instance member within property initializer
  • Issue while getting the frame of the keyboard
  • dynamicMemberLoookup ExpressibleByStringLiteral parameter swift
  • iOS Unity Firebase Messenger Xcode Compile Error: FIRDynamicLinks
  • Firebase Storage Image Cache not updating SWIFT
  • unhandled js exception: application main has not been registered expo TestFlight
  • App freezes on IOS when navigate to another screen - React Navigation
  • How to create haptic feedback for a Button in SwiftUI?
  • How can I achieve automatic scrolling in my text view when text comes down to the keyboard level in Swift?
  • how to get the location with the CLLocationManager every 10 secondes?
  • Calling completion handler of a function from Timer selector function Swift
  • How to make SwiftUI view fullscreen?
  • RAM, JSC, Views, UI and JS usage table appearing whenever I launch my react native app. How to remove this table?
  • Change status bar background color using UIStatusBarManager
  • Should we make tapGesture component an IBAction or IBOutlet to capture the tap event?
  • Iframe automatically goes full screen using Ionic 3.9.2 on iOS
  • How to calculate score out of 1000 given some seconds (In Double)
  • How to calculate time (minutes) between two dates in swift?
  • There was problem loading requested app.it looks like you may be using LAN URL
  • Swift circular corners doesn't work properly on different screen sizes
  • How change .navigationBarTitle font in SwiftUI?
  • What happens if `MPSCNNConvolutionDataSource` protocol's `load` method return false?
  • Why does the UIBarButtonItem not show up when I create it with code?
  • How to prevent following view controller inheriting navigation view controller bar?
  • What does it mean when .xcodeproj files are shown in red in Xcode?
  • Xcode SwiftUI how to scroll the Preview Canvas?
  • Expand tableview and increase scrollview content size by an appropriate difference on clicking a button inside a table c
  • xcodebuild failed with return code: 65 - using CLI/Appcenter but no error messages
  • "'isDeveloperModeEnabled' is deprecated: This no longer needs to be set during development. " What is isDevelo
  • Right click in UIKit for Mac
  • How we Support Dark Mode in Current iOS App with iOS 13?
  • Security vulnerablility issue in ios mobile app
  • How to set a background color for the viewController in swiftUI?
  • SwiftUI : Segue navigation
  • iOS 13 Custom UISearchBar _searchField crash
  • USDZ models have holes in SceneKit but not QuickLook
  • Why does iOS Password Autofill not prompt to save password on keychain?
  • Pushing information to firebase after event is created(Firebase-Realtime-Database)
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com