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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:40:43+00:00 2026-06-05T13:40:43+00:00

So I am working on a vital update to an app I have on

  • 0

So I am working on a vital update to an app I have on the appstore. I have an app with a tab bar and a nav controller. When the user selects an item from the list it sends the link it is getting from the xml file sent from my server to a detail view controller that is only a web view. The problem I’m having is when the user goes back to the tableview which is the root view for that tab the detail view isn’t being released. When you select the other options in the app, the detail view doesn’t change. It’s not that my data isn’t being released from the uishared application data but its the view isn’t releasing. I know that there are many similar items like this on here and i’ve tried all of them. I will give you some of my code and greatly appreciate other tips and tricks. Im 15 and just getting into development so any info helps. Heres the code i think is necessary for anyone to help.

TableViewController

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1];
    NSString * storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"];

    // clean up the link - get rid of spaces, returns, and tabs...
    storyLink = [storyLink stringByReplacingOccurrencesOfString:@" " withString:@""];
    storyLink = [storyLink stringByReplacingOccurrencesOfString:@"\n" withString:@""];
    storyLink = [storyLink stringByReplacingOccurrencesOfString:@"  " withString:@""];

    videoDetailViewController.title = @"Videos";

    ExampleAppDataObject* theDataObject = [self theAppDataObject];
    theDataObject.videoData = storyLink;

    if (self.videoDetailViewController == nil)
    {
        VideoDetailViewController *aBookDetail = [[[VideoDetailViewController alloc] initWithNibName:@"VideosDetailView" bundle:[NSBundle mainBundle]] autorelease];
        self.videoDetailViewController = aBookDetail;
        [aBookDetail release];
        aBookDetail = nil;
    }
    [self.navigationController pushViewController:videoDetailViewController animated:YES];
}

DetailViewController:

#import "VideoDetailViewController.h"
#import "RSSEntry.h"
#import "ExampleAppDataObject.h"
#import "AppDelegateProtocol.h"
    
@implementation VideoDetailViewController

@synthesize activityIndicator;
@synthesize webView;
@synthesize pasteboard;

- (ExampleAppDataObject*) theAppDataObject;
{
    id<AppDelegateProtocol> theDelegate = (id<AppDelegateProtocol>) [UIApplication    sharedApplication].delegate;
    ExampleAppDataObject* theDataObject;
    theDataObject = (ExampleAppDataObject*) theDelegate.theAppDataObject;
    return theDataObject;
}

- (void)viewDidLoad
{    
    ExampleAppDataObject* theDataObject = [self theAppDataObject];
    NSString *urladdress = theDataObject.videoData;
    NSURL *url = [NSURL URLWithString:urladdress];
    NSURLRequest *requestobj = [NSURLRequest requestWithURL:url];
    
    [webView loadRequest:requestobj];
    pasteboard = [UIPasteboard generalPasteboard];
    [super viewDidLoad];
}

- (void)dealloc
{
    [webView release];
    webView = nil;
    
    [activityIndicator release];

    [pasteboard release];
    
    [VideoDetailViewController release];
    [urlData release];
    urlData = nil;
    
    [super dealloc];
}
        
@end
  • 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-05T13:40:44+00:00Added an answer on June 5, 2026 at 1:40 pm

    Don’t release the webview in the detailViewController page, instead, put
    [webView loadRequest:requestobj]; in in viewDidAppear(), not viewDidLoad

    Also:
    One way to make the transition smoother, change:

    if (self.videoDetailViewController == nil) {
        VideoDetailViewController *aBookDetail = [[[VideoDetailViewController alloc] initWithNibName:@"VideosDetailView" bundle:[NSBundle mainBundle]] autorelease];
        self.videoDetailViewController = aBookDetail;
        [aBookDetail release];
        aBookDetail = nil;
    
    }
    
    [self.navigationController pushViewController:videoDetailViewController animated:YES];
    

    Should be:

    VideoDetailViewController *aBookDetail = [[VideoDetailViewController alloc]     initWithNibName:@"VideosDetailView" bundle:[NSBundle mainBundle]] ;
    [self.navigationController pushViewController:videoDetailViewController animated:YES];
    [aBookDetail release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code, which is vital to understand a class I'm working
I'm currently working on basic user authentication for an app I'm putting together, and
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working on game where plates will be falling from top to bottom. Some plates
I am working at a web app in Rails that behaves much like a
I am working with GWT and have 4 Service Implementations that need a PersistenceManagerFactory.
Similar question from last night, I don't have access to edit the source HTML
Working in an MVC application and getting an image array: Controller <?php // model
I've been working on my first robot for google wave recently, a vital part
So I have a Rails application that upon user submission should generate some kind

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.