Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Dec 15, 2008, 11:43 AM   #1
macrumors newbie
Join Date: Nov 2008
Problem With Replacing a View

Hi All,

I am having an application where in I fetch some data from a remote web server. Since the data fetching will take some time, when the ViewController loads, in its loadView method i am showing a splash screen with a progress bar on it. Now once this is loaded, in the viewDidAppear method of my view controller i am creating another thread which loads the data from webserver and the thread calls back one method in my view controller with the data to be loaded. All these things are happening fine. Now the problem is once i get the data back i want to create a new view and replace my welcome screen view with the newly created one. When i am creating the new view which is a subclass of UIView it calls the init method but the drawrect method is not getting called. Is there any restriction that the view can be replaced only when some event occur? Please suggest..

Thanks in advance......
tonydleopard is offline   0 Reply With Quote
Old Dec 15, 2008, 12:20 PM   #2
Thread Starter
macrumors newbie
Join Date: Nov 2008
Solved that issue but have another....

The problem is solved... It was bcos the second thread was taking the control and my main thread was not listening at all I think. I removed the second thread and used NSURLConnection to load the data. But if we are using multithreading how do we get the control back in the main thread???
tonydleopard is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Make a UIColor with RGB values? or this might be a problem with loading my view...not stoopkitty iPhone/iPad Programming 1 Apr 2, 2011 03:39 PM
Problem with moving a view cjhsb iPhone/iPad Programming 17 Sep 19, 2008 06:56 AM
problems with replacement iphone Lucas44 iPhone Tips, Help and Troubleshooting 0 Feb 11, 2008 06:46 AM
Problem with mail-app can't view mail? viccles Mac Basics and Help 2 Oct 27, 2007 10:44 PM

All times are GMT -5. The time now is 05:37 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC