Hi,
is there anything like an identifier of a NSSThread? The following code:
NSLog(@"thread: %@",(NSThread*)aThread);
results in something like this:
Thread: {name =
(null), num = 6}
Is there a way to get this thread number, maybe?
Best,
heinrich
...
I have working snippet along the lines of:
for (UIButton *b in buttonMapping) {
[b setTitle:@"yo!" forState:UIControlStateNormal];
[NSThread sleepForTimeInterval:1.0];
}
There's four buttons, all four buttons update. However, instead of updating one per second, four seconds go by & they all update.
How can I force UIButton to up...
Hi,
I'm trying to include some C++ code into my iPhone project and I'm getting the following compiler error:
"error:expected initializer before '<' token"
at this code construct:
template<typename T, P_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
P_UINT_32 EKType<T, BEG, OQ, OVR, DBG>::getSizeX() const {
return n;
}
It looks...
Is it bad form to point the view property of my UIViewController subclass directly at a UIImageView? Or should my UIImageView be embedded in a UIView?
I can't think of any problems with it, and it seems to work alright, but I thought I'd ask the hive-mind if there are any negative consequences to doing this.
...
I am having trouble getting Cocoahttpserver from Duesty Designs (awesome open source library makers of CocoaAsyncSocket) to serve images from my app bundle. Using the example iPhone project I can serve up an html file from the Resources dir in my project, but images refernced like:
<img src='foo.png' />
are not rendered.
Does anyone ...
I have just heard that the iphone cannot do double natively thereby making them much slower that regular float.
Is this true? Evidence?
I am very interested in the issue because my program needs high precision calculations, and I will have to compromise on speed.
...
I am using UISearchDisplayController to implement the search feature on a table view. My table view cell uses custom background image.
When you first type a letter into the search textfield, the search results start appearing. However, when I click cancel at this point, the screen flashes white. This is not as noticeable if everythin...
hi all,
Is it possible to set custom return key type for UITextField?
[txtField setReturnKeyType:UIReturnKeyDefault];
I want to have the word "SHARE" in place of the return key type.
Thanks
...
The root question is "how many UIViewControllers can you push on the navigation stack?"
Suppose I have an application that is basically a database for three entities where each can have a relationship with some other entity, and the relationship is shown on a UIViewController. Users can follow those relationships and each one brings up ...
I'm implementing a UIView's (UITableViewCell to be more exact) drawRect method.
My view has a transparent background, so when something is changed in the view, the older drawn version still remains there. So if on the first drawRect draw an "A", then a "B" on the same point, I get both of them drawn on top of each other.
How can I tell ...
What is the best way to bind Core Data entities to enum values so that I am able to assign a type property to the entity? In other words, I have an entity called Item with an itemType property that I want to be bound to an enum, what is the best way of going about this.
...
I have a rather tricky scrolling scenerio I need to get sorted. I have a parent UIScrollView with a single container view containing two child UIView subclasses. Call them viewA and viewB. The UIScrollView has been constrained to scroll/zoom horizontally. ViewA and ViewB are layed out as horizontal strips, one above the other. The bounds...
How can I get first and last days of the current week? What I need is some way of filtering a set of objects with NSDate property to leave only ones, that appear on current week, and then filter them by days. Also I need some way to get localized day names.
I've tried to play with NSCalendar, NSDate and NSDateComponents, but it seems th...
I have an app that rotates on some (but not all) screens, and I also want to add a UIView as an overlay that shows up on all screens, so I thought I'd add it to the window. The problem now is that when I rotate the device, the screens rotate, but the overlay view does not.
I also tried using two UIViewControllers, one for the normal st...
I have a UIScrollView that contains multiple UITableViews horizontally - all of which are created programmatically depending on the user's action.
Say I have 4 UITableViews, how do I set the datasource and delegate for each one programmatically? I understand there are tableViewX.dataSource and tableViewY.delegate methods; and I assume I...
I have a UIViewController that I want to load from a NIB that has a proxy (placeholder) object defined in it. The first time I load it, I go through this rigamarole:
MyViewController *screen = [[MyViewController alloc] init];
NSDictionary *proxyDict = [NSDictionary dictionaryWithObject:myObject forKey:@"MyProxy"];
NSDictionary *option...
I have been solving the Stanford free iPhone course project called Presence 3 (found on the stanford site: www.stanford.edu/class/cs193p/cgi-bin/downloads.php, which pulls data from twitter for users, which are stored in a plist. A UIActivityIndicator (spinner) is visible while the data is loading. Once the data has been loaded, a TableV...
How can I do this without having a million if then statements?
...
howdy,
i'm trying to write a little concept app which reads the character stream as the user types in a UITextView, and when a certain word is entered it is replaced (sort of like auto-correction).
i looked into using -
(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
b...
Say I wanted to have the first six characters in black and the next six characters in blue, then the last 20 characters in black of a UILabel. Is this possible?
Thanks!
...