I have a long hex value stored as a NSString, something like:
c12761787e93534f6c443be73be31312cbe343816c062a278f3818cb8363c701
How do I convert it back into a binary value stored as a char*
...
I just converted an Objective-C library to a C library in the hopes of making it cross platform. However, everything appears to do okay until I send this thing off to be processed.
It's at the point I get an error.
Looking back a few revisions, I noticed something in the debugger.
Right after a malloc'd string like so:
char *theStri...
Is there any means of reflection in Objective-C that would allow you to write generic NSCoding implementations by inspecting the public properties of an object and generating generic implementations of encodeWithCoder: and initWithCoder: .
I'm thinking of something like XStream for Java that allows a generic way to serialize and deseria...
I am looking to make a checkbox cell only displays it self on the child's row's inside the outline view, so when you drop down the parent the checkbox will appear for the child entity's rows. What would I need to do this?
If this helps here is a Picture of the Entity Diagram: http://snapplr.com/phrn
...
I notice something strange happens to one of my view controller: the back button disappears, yet it's possible to go back to previous view controller by tapping the top left corner (i.e where the button should reside).
In my entire file there's no line that set self.navigationItem.hidesBackButton to YES; also NSLog prints 0 as self.navi...
i want a view with UITabBAr at The bottom with some buttons+Navigation controller on each view and a tableview inside the view using interface builder and windows basaed application template. i want a step by step guide to do this
...
So the the problem is that when someone touches the back button on the UINavigationControler, I would like to run some code to update the datasource.
The problem is that i cant seem to find the right delegate to do it. only these are available on the nav controller delegate, and i want the 'didfinishshowing' type method.
– navigationC...
Is there an easy way to achieve that?
I have an UIImageView that reacts on a touch event. When the touch is detected, some animations happen in the App. After one second I want to call another method. In this case, I can't use the animationDidStop selector.
...
Example:
I have an class that inherits from UIImageView. An object creates an instance from that class. Now, that class needs a weak reference to it's parent. I could make an initializer where the object has to pass "self" to the new created object. But I feel that there is a better way. Is there any?
...
I'm loading a view from a tableview touched cell that contains a photo that is downloaded from the web. I've set up a busy indicator that is called when the cell is touched and then turn it off in the viewdiddisappear method but when you touch the cell there is still a long pause when the cell is touched then the busy indicator shows u...
I've got a navigation controller based app that downloads an RSS feed and lays out the item titles in a TableView. That part works. When I click on an article title, I want to push an instance of my FeedArticleController onto the navigation stack. The FeedArticleController loadView method sets up the views (since I want to learn how to d...
What's the best way to know when my array controller that is bound to my core data store is done loading its content?
I've got some methods (i.e. awakeFromNib) that rely on the array controller having its content, but most of the time the array controller doesn't have its content yet when awakeFromNib is being called on that object. ...
I'm trying to read the cocos2d api doc but I'm confused about what the [...] means in something like:
- (float) scale [read,write,assign]
I am expecting a type and a parameter name, so something like
- (void) addFrameWithFilename: (NSString *) filename
makes sense.
...
Example: I have a selector like this, which I give to another method as parameter:
SEL mySelector = @selector(doSomething:);
I would like to call that doSomething method now inside that method.
Background: I have an method that performs some core animation actions. It uses already the didStopSelector, which calls an special memory ma...
I have a few method calls like this:
[self myFoo];
[self heavyStuff]; // this one in other thread
[self myBar];
which classes / methods do I have to look at? When I search for "thread", there comes a lot of classes, methods and functions. Which one's are most apropriate here?
...
I'm seeing an odd behavior with trying to get seconds since epoch in objective C. This:
NSString *nowTimestamp = [NSString stringWithFormat:@"%d",
[[NSDate date] timeIntervalSince1970]];
Outputs 15907296, when the current timestamp should be 1243555623 (05/28/2009 @ 7:08pm EST). The system time on the i...
What's the best way to check if a Nib or Xib file exists before trying to load it using initWithNibName:bundle: or similar?
...
Hi all,
I was just recently futzing about with a sample application trying to get my head completely wrapped around NSRunLoop. The sample I wrote created a simple secondary thread via NSOperation. The secondary thread does a few tasks such as process an NSTimer and also some rudimentary streaming with NSStream. Both of these input sourc...
I'm trying to populate a dictionary dynamically in a for loop like so:
pseudo-code
myObject = new Object
myDict = new Dictionary
for(int i; i < 10;i++)
myObject.value1 = new data from somewhere
myObject.value2 = new data from somewhere
myDic = value:myObject key:i
end for
So my question is in objective-c, can I just keep assig...
What are the parenthesis doing in
[s addChild: [restartAction() node]];"
or what is that feature called? Thanks.
EDIT:
I think the definition of restartAction() is
Class restartAction()
{
NSString *r = transitions[sceneIdx];
Class c = NSClassFromString(r);
return c;
}
transitions[someint] returns a string. This strin...