Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:24:29+00:00 2026-06-17T13:24:29+00:00

Using a prototype cell and custom UITableViewCell with a UISwitch and UIActivityIndicator. Flipping the

  • 0

Using a prototype cell and custom UITableViewCell with a UISwitch and UIActivityIndicator. Flipping the switch causes an NSURL Post request and disables the switch. This is working fine.

Now, I’d like to connect up the Activity Indicator to have it spin during while the network request is working.

Added this in the subclassed UITableViewCell .h/.m

@property (nonatomic, weak) IBOutlet UIActivityIndicatorView *activity;

@synthesize activity;

Then in the UITableViewController, receive the switch change with:

- (IBAction)changeSwitch:(id)sender
{
     UISwitch *mySwitch = (UISwitch *)sender;
    [sender setEnabled:NO];
    // turn on activity indicator  (**Edited next 2 lines**)
    UIActivityIndicatorView *av = (UIActivityIndicatorView*) [[self view] viewWithTag:2101];
    [av setHidden:YES];
    // create a datamanager to send the request
    ...
}

I’ve looked at tags, connections and considered calling a method of the TableViewCell to start/stop the indicator, but can’t find the answer.

How can the action of the switch connect to start the activity indicator?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:24:30+00:00Added an answer on June 17, 2026 at 1:24 pm

    Solved the problem of connecting to these prototype cell objects, by first giving them a tag number in the storyboard attributes inspector for the activity indicator & switch, and later accessing their properties from within the UITableViewController (subclass) using:

    UIActivityIndicatorView *av = (UIActivityIndicatorView*) [[self view] viewWithTag:2101];
    [av setHidden:YES];
    
    UISwitch *sw = (UISwitch*) [[self view] viewWithTag:210];
    [sw setEnabled:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am configuring a custom UITableViewCell using a prototype cell in a Storyboard. However,
I'm using a prototype cell inside a grouped UITableView to create custom cells with
I am using storyboarding. I have an UITableView with one prototype cell. This cell
I'm using a standard prototype cell with a label and a detail text. I
I'm using prototype to construct an ajax request from an inline onclick on a
Using prototype.js, I create a custom object which is going to be a parameter
I'm currently using Prototype, but I'd like to rewrite this function to jQuery: function
Im building this Digital Signage prototype for a master thesis. Im using WPF and
hello I built this tableview using the InterfaceBuilder and storyboard I used custom for
I'm using a UITableView with a subclassed prototype cell with a UITextField . The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.