nsthread Questions

3

Solved

What is the order of operations on iOS? I'm thinking sepcifically about timing of setNeedsLayout and layoutSubviews setNeedsDisplay and drawRect touch recognition [NSTimer scheduledTimerWithTime...
Ison asked 3/10, 2014 at 12:4

3

Solved

I am trying to spawn a thread in swift. So I have this line: . . . let thread = NSThread(target: self, selector: doSomething(), object: nil) . . . doSomething is a function within the scope o...
Gardia asked 2/7, 2014 at 21:39

1

Solved

I'm getting this warning in the log window of the debugger: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. ...
Gumdrop asked 26/5, 2014 at 9:54

1

In a current iOS app I am using this perform selector approach: [self performSelector:@selector(doSomething) onThread:myThread withObject:nil waitUntilDone:NO modes:[NSArray arrayWithObject:N...
Siamese asked 2/7, 2014 at 22:4

3

Solved

How can I check for equality between dispatch_queue_t vars? dispatch_queue_t currentQueue = dispatch_get_current_queue(); dispatch_queue_t mainQueue = dispatch_get_main_queue(); if (currentQueue =...
Socialite asked 26/9, 2012 at 16:20

7

I'm trying to use a method from a class I downloaded somewhere. The method executes in the background while program execution continues. I do not want to allow program execution to continue until t...
Amatruda asked 7/10, 2010 at 5:48

4

Solved

A colleague suggested recently that I use pthreads instead of GCD because it's, "way faster." I don't disagree that it's faster, but what's the risk with pthreads? My feeling is that they will ult...
Monopetalous asked 5/1, 2013 at 23:45

2

Solved

I am new in ios development. I have following questions: When we use GCD(dispatch_group_async, dispatch_async(dispatch_get_main_queue()...) and when we use performSelectorInBackground/performSele...
Couch asked 21/10, 2013 at 17:18

4

I've a big headache with the topic. I'm working on an application that needs to poll a webserver regularly, in order to check for new data. Based on the returned information, I wish to push a local...

2

Solved

I have method which makes UI changes in some cases. For example: -(void) myMethod { if(someExpressionIsTrue) { // make some UI changes // ... // show actionSheet for example } } Sometimes...

2

Solved

I read many posts about NSRunLoop, like this, this, this. But can't figure out what NSRunLoop actually does What I usually see is a worker thread wthread = [[NSThread alloc] initWithTarget:self s...
Mottled asked 10/5, 2013 at 7:45

2

Solved

When you print a NSThread's description, you get something like this: <NSThread: 0x1e511b70>{name = (null), num = 1} Is this "num" available somehow? This is for debugging only, so ...
Tyre asked 21/3, 2013 at 21:22

3

Solved

i have created a thread in xcode and i have given the function name to be called from that thread. but my problem is that the function name which is given to call is not being called(came to know ...
Bombazine asked 3/5, 2012 at 7:42

2

Solved

So I'm starting a new NSThread that I want to be able to use later by calling performSelector:onThread:.... From how I understand it calling that methods add that call to the runloop on that thread...
Sphagnum asked 8/6, 2011 at 0:22

2

In one of my views i need to animate frame property of a UIImageView and while doing it i want to show a progress bar(UIProgressView) in the title view of the navigation bar.The problem is the if i...
Canaveral asked 28/1, 2013 at 14:59

1

Solved

My application has a MBProgressHUD on the screen while the CLLocationManager is getting the user current location at a separate thread in the background. Sometimes the location process start to tak...
Calipee asked 27/1, 2013 at 18:38

7

Solved

I am trying to implement an operation queue and I have the following scenario: NSOperation A NSOperation B NSOperation C NSOperation D NSOperationQueue queue I start adding A to queue. During t...
Allyn asked 7/12, 2012 at 11:43

2

Solved

I came across this _cmd trick: -(void)methodToBeRunOnMainThreadWithObj:(id)object { if (![NSThread isMainThread) { [self performSelectorOnMainThread:_cmd withObject:object] } else { // ... met...
Robey asked 2/11, 2012 at 6:14

2

Solved

What's the best way of multithreading in iOS as we have three options GCD, NSThread, and NSOperationQueue? I am confused in which one is the best? If none, then which should be used in what s...

3

Solved

Ok, so say i have a second thread running, but it wants to manipulate something on the main thread, like a UI item. -(void)backgroundThread { [myButton performSelectorOnMainThread:@selector(setEn...
Dehnel asked 25/5, 2011 at 6:51

5

Solved

I am facing a design problem of my app. Basically, the followings are what I am going to do in my app. A single task is like this: Read custom object from the underlying CoreData databse Dow...
Karilla asked 5/9, 2012 at 14:30

3

Solved

Are there any cases when anyone would want to use raw NSThreads instead of GCD for concurrency? I love the GCD, but I want to know if I will need to use NSThreads for Cocoa/Cocoa-Touch eventually. ...

1

Solved

Possible Duplicate: Grand Central Dispatch (GCD) vs. performSelector - need a better explanation To execute "stuff" on the main thread, should I use dispatch_async or performSelectorO...

3

I'm developing an iPad-app and I'm currently struggling with finding the best approach to multithreading. Let me illustrate this with a simplified example: I have a view with 2 subviews, a director...
Marte asked 15/7, 2012 at 22:10

2

Solved

What is the difference between NSThread and pthread? Does NSThread use pthread as its internal implementation and do we really need the extra overhead of NSThread when pthreads suffice especially o...
Haileyhailfellowwellmet asked 5/12, 2010 at 13:16

© 2022 - 2024 — McMap. All rights reserved.