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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:34:19+00:00 2026-06-10T10:34:19+00:00

In a Single-View iOS app I’m currently working on, I have a view controller

  • 0

In a Single-View iOS app I’m currently working on, I have a view controller designed to manage playback of an audio stream, as well as a series of UI elements for playback control, scrolling, etc…For the sake of clarity, we’ll call it AudioStreamerViewController.

A ‘track selection’ button in this view is wired to an action displays a TrackSelectionTableViewController modally, with the intention of allowing the user to select a track and return to the playback view when tableView:didSelectRowAtIndexPath: gets called.
When this row selected method fires, the objective is to message the delegate callback method in AudioStreamerViewController that then attempts to execute self.currentTrack = trackObjPassedToCallback.

The problem is AudioStreamerViewController calls its currentTrack setter a seemingly infinite number of times (like an “I have to stop the simulator or I’ll run out of memory” number of times), and I cannot seem to figure out why. I took a screenshot of the call stack. It had a breakpoint set so it only shows seven calls in the image, but believe me, it’ll keep going =)

I’m wiring the two ViewControllers up by making AudioStreamerViewController the TrackSelectionTableViewController‘s delegate using the following prototype:

// in TrackSelectionTableViewController.h

@interface TrackSelectionTableViewController : UITableViewController {
    NSMutableArray *tracks;    
}
@property (nonatomic, assign) id<TrackSelectionTableViewControllerDelegate> delegate;

@protocol 
// in TrackSelectionTableViewController.m
@synthesize delegate;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      Track *trackSelected = [tracks objectAtIndex:[indexPath row]];
      [self.delegate userDidSelectTrackFromTableView:trackSelected ];
      [self dismissModalViewControllerAnimated:YES];
  }

AudioStreamerViewController‘s prototype and delegate callback look like:

// in AudioStreamerViewController.h
@interface AudioStreamerViewController : UIViewController <SCDJTrackSelectionViewControllerDelegate> {
    Track *currentTrack;
}
@property (nonatomic) Track *currentTrack;

-(void)userDidSelectTrackFromTableView:(id)trackObj;

// in AudioStreamerViewController.m
@synthesize currentTrack;
-(void)userDidSelectTrackFromTableView:(id)trackObj
{
    self.currentTrack = (Track *)trackObj;
    // other handling code...
}

I’ve tried to do this a number of ways, and each of them produce the same end result. Can anyone identify any indicators of why this is happening? Also, is there a more attractive / stable approach to implementing this idea? If so, what are the benefits?

  • 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-10T10:34:20+00:00Added an answer on June 10, 2026 at 10:34 am

    The answer is in your stack trace. -setCurrentTrack: is calling -setCurrentTrack:. What is your code for -setCurrentTrack:?

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

Sidebar

Related Questions

I have a single view on my iOS application, with a mapView in it.
I'm working with a Navigation Controller based iOS app. There are multiple tableView screens
So I started an iOS app with the single view template. I then added
On iOS, if there is a single view app, and a new thread is
I have a single view application (created from the iOS Template, nothing special) There
I have a single-view application that takes in a username and a password and
I have a single view application. It has myAppDelegate and myViewController. In a earlier
I have picker controls on a single view with two outlets for each. When
I need to display array of images in a single view which have various
I'm new to apple's development scene and have been working on an app for

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.