I am returning a string of either T or F from an NSDictionary key value pair. I'm trying to find out if it is the T or the F, but it never works like I would expect it to. I'm sure there is a very basic solution for this issue.
if ([game objectForKey:@"complete"] == @"T") never evaluates to true.
...
Hi,
I am reading an data from an XML file for my iPhone application. This data contains html tags such as <p></p> <strong> <B>, etc in it. By using NSString class can i remove these tags and format the display of the text as needed.
For example, if text inside the <p> </p> i want to display it in next paragraph. Is it possible?
Pleas...
Hello,
I'm learning Objective-C and i would like to know where i can found a IDE for Objective-C on Linux?
...
I have a UITableView with custom cells.
I have MyTableViewCell : UITableViewCell and MyTableViewCellContentView : UIView classes.
What I'm doing is basically what is done in the AdvancedTableViewCells demo app from Apple with a slight change, on some rows I want to use a clearColor background to show the table's background behind the pa...
My goal is to achieve compatibility across 3.x SDK versions for UIImagePickerController and it's allows(Image)Editing property.
// SDK 2.0 to 3.0
myImagePickerController.allowsImageEditing = YES;
// SDK 3.1
myImagePickerController.allowsEditing = YES;
Some research reveals some objective-c approaches, but what is considered best prac...
In objective-c/xcode, is there a way to write the definition of a method in the implementation and have automatically added to the header file?
...
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...
I'm new to iPhone development and XCode in general and have no idea how to begin troubleshooting an EXC_BAD_ACCESS signal. How can I get XCode to break at the exact line that is causing the error?
I can't seem to get XCode to stop on the line causing the problem, but I do see the following lines in my debug console:
Sun Oct 25 15:...
I made a scrolling tile 2D video game in visual basic a few years back. I am translating it to Cocoa for the Mac. Is there a framework that would allow me to use BitBlt? Or is there an equivalent to BitBlt without using OpenGL? Thanks!
...
I've recently started down the road of programming in Objective-C, and I'm now looking into Core Data. However, I am confused about exactly what defines the model itself in Core Data.
Here's what I mean: Say I create an entity with some set of attributes using the graphical model builder. I then have Xcode generate code for the corre...
How exactly does one implement two separate "tableviews" on one view like in this image:
...
I am attempting to fill some text with a gradient-fill, where by I set the text drawing mode to clipping, and then paint a gradient-fill.
The problem is, whenever I set the text drawing mode to clip, every character of the text string is placed on top of each other, rather than being painted in a sequence to form a word - it is most biza...
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 ...
Objective C on iPhone:
I am attempting to declare the following object at class level so that i do not have to re-connect this socket every time I write something to it. (Writing things multiple times a second) whenever i am writing a steady stream of live data, about every 2 seconds it freezes. I don't know why, but it does.
Code:
Soc...
Hey
I'm using AVAudioPlayer to play music in my iPhone app.
In a class that I wrote I have an array that contains random ascending integers. (2, 4, 9, 17, 18, 20,...)
These integers represent times in the song at which a certain event should occur. So if you take the above array, after 2 seconds of the song playing, some method should...
-(void)invokeMethod
{
NSMethodSignature * sig = [[source class] instanceMethodSignatureForSelector:@selector(mySelector:)];
NSInvocation * invocation = [NSInvocation invocationWithMethodSignature:sig];
[invocation setTarget:myTarget];
[invocation setSelector:@selector(mySelector:)];
MySubClassOfNSInvocationOperation...
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 been creating a peer to peer connection for a new game, that does not use the peer picker. I am however dumbstruck as what to i put in here:
- (void)session:(GKSession *)session didReceiveConnectionRequestFromPeer:(NSString *)peerID {
NSLog(@"I GOTS A CONNECTION REQUEST");
if(connected == YES) {
//deny all requests
}
else if(con...
how to find ip of iphone device programatically??
...