Hi
I would like to see if I can make a "search as you type" implementation, against a web service, that is optimized enough for it to run on an iPhone.
The idea is that the user starts typing a word; "Foo", after each new letter I wait XXX ms. to see if they type another letter, if they don't, I call the web service using the word as a...
I have 2 threads in my application, a game update thread and render/IO/main thread.
My update thread updates the game state, and the render thread renders the scene based on the updated values of the game state models and a few other variables stored inside an object (gameEngine).
The render thread gets executed while the game thread is...
I an trying to put a method in a separate thread in the background. It nearly works except that occasionally I get a lot of error messages with the message
METHODCLOSURE: OH NO SEPERATE THREAD
with the bad spelling and all.
Does anyone know what this means? The thread runs, interestingly
More specifically:
I invoke a background pr...
Hi all,
In my application, I want to fetch new xml data after user scrolls through tableview and pulls the first cell down. As the data is loaded in tableview in chronological order, the updated data will be shown before the first cell.
I want to run this process on new thread, so what is the best option :
Subclass NSThread and use i...
I have an app that uploads to Google Spreadsheets via the GData ObjC client for Mac/iPhone. It works fine as is. I'm trying to get the upload portion on its own thread and I'm attempting to call the upload method on a new thread.
Look:
-(void)establishNewThreadToUpload {
[NSThread detachNewThreadSelector:@selector(uploadToGoogle)...
Hi,
I have developed an application which has retrieved the information from remote location...so i put those in UITableView's Section.In response, i will be getting images also..for this i put the background process(only for images..because the app will take more time to retrieve images than text based information..).It is working fine....
My problem is simple to be described but it seems to be hard to solve. The problem is loading icons, with a custom class like IconDownloader.m provided by an official example from Apple, avoiding crashes if I release the view.
I've added the IconDownloader class to my app, but it's clear that this approach is good only if the tableview ...
Yesterday I read somewhere that NSTask isn't thread safe and that bothers me a lot, because I'm running a NSTask within a NSThread and is so far not experiencing any threading issues with it.
My code is organized like this
A: main thread -> B: worker thread -> C: worker task
C: The worker task is a commandline program.
B: The worker t...
Currently I'm using NSThread to cache images in another thread.
[NSThread detachNewThreadSelector:@selector(cacheImage:) toTarget:self withObject:image];
Alternatively:
[self performSelectorInBackground:@selector(cacheImage:) withObject:image];
Alternatively, I can use an NSOperationQueue
NSInvocationOperation *invOperation = [[N...
Hello everyone,
I am curious to know if you can loop an NSThread for the iphone sdk. I have learned that instead of using NSTimers which do run off of the main UI, I can use NSThreads to run actions in the background. Most of my NSTimers have the "repeats:" to YES, thus I need to know if NSThreads can be looped.
Thanks
Kevin
...
I'm still new to Objective C syntax, so I might be overcomplicating this, but I can't seem to figure out how to pass an NSTimeInterval to a thread.
I want to initiate a thread that sleeps for x seconds parameter sent from main thread as follows:
[NSThread detachNewThreadSelector:@selector(StartServerSynchThread) toTarget:self withObje...
I have called a method using NSthread. I want to stop the thread on a click event of button.
How can i achieve that ?Please help me out.Thanks.
[NSThread detachNewThreadSelector:@selector(playVideo) toTarget:self withObject:nil];
...
Hi all, I am aware of the many questions regarding this topic, as I myself have asked one previously however, my issue now seems to be more related to the threading part. I have the following 2 methods.
-(void) restartTimer {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
self.timer = [NSTimer scheduledTimerWithTimeInterval...
I created a sub-thread using NSThread in main thread
NSThread *newThread = [[NSThread alloc] initWithTarget:self selector:@selector(MyThread:) object:timer];
5 sec later,i used [newThread cancel] in main thread to stop the sub-thread,but it didnt work,
Method MyThread: in newThread still working
so,whats the correct answer to stop ne...
so I have an array with objects @"One", "Two", "Three", "Mouse"
and I want to have each word of the array NSLog'ed to the console in half second increments. I also would like to be able to switch to 1 second increments instead. Can anyone please help me write this code. I'm new, but I need to understand this project.
I was tipped that I...
Hi there!
I have a big problem since a few days that I can't solve.
First I have a login view controller with this code :
@implementation MMConnectionViewController
@synthesize login, password, activityIndicator, mainVC;
- (BOOL)textFieldShouldReturn:(UITextField *)aTextField
{
[aTextField resignFirstResponder];
[self performSel...
I'm trying to use threading to load an image from a url. I have no background code and I'm having trouble getting the NSThread thing to work. What I've got is a UIimageView called photo1 and I've got an image that loads in from the net. (say http://www.google.com/logos/classicplus.png) but when navigating to the screen, the app pauses to...
Hello,
I've got a lovely OpenGLES code slice that renders up images for me. When I want to, I can call a function on it:
-(UIImage *)renderToImage;
That does a lot of rendering work and returns me an image. This includes the generation of FBOs, textures, etc.
Lately, I've found myself needing to enhance this. The image generation ta...
I have a function which executes as a different thread, thread named imageThread. But when the device rotates, the control automatically returns to the main thread and after their execution its given back to the imageThread. That's how i wanted it to function. But the problem is I am using some global variables, whose value changes in th...
Hi
I have a problem in my code.
I want to launch the thread but when it is launched they can't start a NSTimer istruction.
Can you help me?
-(void)detectionMove:(NSTimer*)timer{
int indexArray = [[[timer userInfo] objectForKey:@"arrayIndex"] intValue];
// do something
}
-(void)callDectectionMove:(NSNumber*)arrayIndex{
...