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 8826811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:13:56+00:00 2026-06-14T07:13:56+00:00

I read some similar questions about this on Stack Overflow, but none of them

  • 0

I read some similar questions about this on Stack Overflow, but none of them had a satisfying answer.

What I am trying to achieve is a “Facebook Sign In Button” from the Settings screen.

Facebook Settings Screen

I want to achieve this using Static Cells.
But I soon discovered that I could not connect a “Action” to the UITableViewCell using Xcode.

I then tried to achieve the same result using a Custom UITableViewCell with a UIButton inside, but it resulted it a lot of extra styling trouble to make it look exactly like a real UITableViewCell.

Now I managed to make the UITableViewCell to behave like a Button using the following solution:

I changed the Identifier of the “Login Button” UITableViewCell to “loginButton”. And I added the following code to the Table View Controller.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if ([[selectedCell reuseIdentifier] isEqualToString:@"loginButton"]) {
        NSLog(@"Clicked");
        // Execute function to run code for Login button
    }
}

Instead of executing a IBAction (which would have been the case if I could just link it like a button in Xcode) I am now going to execute a Function.

This is working like expected. But the reason I created this question is: I want to know if this is the right way to go. Is this ok? Is this bad? Why is this ok or bad? Is there a better solution? Thanks!

  • 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-14T07:13:58+00:00Added an answer on June 14, 2026 at 7:13 am

    Thats a reasonable way to go.

    A similar solution using indexpaths would be:

    Create an outlet for the Table View Cell from IB.

    @property (strong, nonatomic) IBOutlet UITableViewCell *loginButtonCell;
    

    Then implement the didSelectRowAtIndexPath: method.

    - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath       *)indexPath
    {
        if ([indexPath isEqual:[tableView indexPathForCell:self.loginButtonCell]])
        {
            // This will get called when you cell button is tapped
        }
    }
    

    You can then re-order and without having to modify your code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have read some of the similar asked questions, but I don't know
I've seen some similar questions to mine here, but they don't really answer me...
I know similar questions have been asked before (I've read most of them), but
I read all the similar questions, but none seemed to be a good fit
I read some articles about Comet tech. All of them mentioned that the long-life
I've read some articles about Android NDK. Most of them claim Native C is
I have read a ton of questions/answers on here regarding questions similar or about
I've read all the documentation about hooks , similar questions and a lot of
Let me begin by saying this; I know that similar questions exist, but they
I've had a similar question but the answer did not entirely fix my problem.

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.