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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:09:47+00:00 2026-05-25T10:09:47+00:00

My iOS app is current transferring control to a detail view when an item

  • 0

My iOS app is current transferring control to a detail view when an item in a UITableView is selected. This ia a quiz program, and I’d like to change the app so that it just redisplays the same table view with the correct answer highlighted when a row is selected. What’s a good approach for doing this?

  • 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-05-25T10:09:48+00:00Added an answer on May 25, 2026 at 10:09 am

    Is not clear to me if you know why the detail view is appearing. So I’ll explain just in case. If you are giving control to a detail view is because somewhere in your code you are pushing that detail view. It depends on what kind of UITableViewCell you are using. If you are using one of the defaults styles, your detail view is probably been pushed in either:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    

    or

    - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
    

    If you are using a custom cell, then you need to look for the method in charge of pushing
    that detail view.

    I think a good approach would be to:

    1. Remove that pushing wherever it is.
    2. Not to use an `UITableViewCellAccessoryType, if you are using one.
    3. Do something similar to the following on your tableView:didSelectRowAtIndexPath:

      • Find the row for the right answer in your model array, according to tapped cell.
      • Use that row number to generate an NSIndexPath.
      • Use that NSIndexPath to find the correct cell with cellForRowAtIndexPath:
      • Call setSelected:animated: on that cell to highlight it.

    NOTE: If your quiz has more answers than the amount of UITableViewCells that fit in the screen you should scroll your UITableView to the right answer for better UX.

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

Sidebar

Related Questions

I'm writing an iOS app with a table view inside a tab view. In
I'm working on an iOS app where I want to load one view if
UPDATE It looks like this problem has been quietly fixed in iOS 4.3. Up
In my current iOS app, I need to perform several network operation when the
I am developing an iOS app. How can I know the current section that
I have this code in my iOS app: - (IBAction)cameraButtonPressed:(id)sender { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]
I'm assuming this warning is crashing my app. I'm using objective-c for an iOS
I'm developing a iOs 5 app ( View in App Store ) with native
I'm in the process of migrating an App to the current iOS SDK. Its
For a current project I am embedding a mobile site into an iOS app.

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.