I can only guess, but please correct me if I am wrong:
[encoder encodeValueOfObjCType:@encode(NSDecimal) at:&theDecimal];
where encoder is an instance of NSCoder.
But one thing is strange: Why is there no key to provide? How would I get that back then, without a key?
...
I have moved my iPhone app from one machine to another. In the process my info.plist file seems to have a bad bundle identifier and is not working. I want to create an entirely new info.plist file for my project.
How can I do this?
...
I am not sure about this:
// assume value is a NSDecimal type and exists
NSDecimalNumber *decNum = [[NSDecimalNumber alloc] initWithDecimal:value];
[encoder encodeObject:decNum forKey:@"someKey"];
[decNum release];
I'm wrapping the NSDecimal into an NSDecimalNumber object. I have to release it somewhere. But I am not sure... does the ...
I have this game with some variety of textures. Whenever I draw a texture I bind It and draw It.
It's possible to draw all the elements of my game in just one draw call ? , with Interleaved Arrays ...how can I do It ?
The performance of my game will increase by doing this ?
...
Hi...I have an UIButton, which logs the content that is present in a couple of UITextField's.But when I click on this UIButton thrice, the simulator hangs and the debugger is opened. Can someone tell me why is this happening. It happens only when there is content in UITextFields.
...
I have an NSDecimal in a tight calculations loop, where I need to floor the value. I want to prevent creating fat NSDecimalNumber objects just for that. Is there a cost-efficient way to get a floor? That floor is just needed to calculate how many times another value might fit in there, with no rest. The NSDecimal API doesn't provide some...
I wanted to know, the best methodology (with code sample please) of having a login feature on an iPhone application, that would connect to a server. I am assuming web service sending via SOAP isn't the safest.
Thanks guys
...
Hello all,
I want to draw a piechart in my application. Do anyone know any code or tutorial to help me out. I found some in the following link
http://rajeev.name/blog/2009/01/18/drawing-pie-charts-using-iphone-sdk/
but if there is any other more efficient way to do it, I want to learn it.
...
I have an iPhone app with a tableviewcontroller. When you click a certain cell it opens a new uiviewcontroller with this code:
nextViewController = [[avTouchViewController alloc] initWithNibName:@"avTouchViewController" bundle:nil];
The uiviewcontroller above called avTouchViewController has a property that looks like:
IBOutlet Som...
Is it currently possible to compile Python and PyObjC for the iPhone such that AppStore applications can written in Python?
If not, is this a purely technical issue or a deliberate policy decision by Apple?
...
It's been a while since I messed with my TableViewController so I'm a bit rusty...but now I'd like to set it up so that when a section has zero rows to display (array is empty) then it will "lie" to the controller and return 1 for numberOfRowsInSection. Then in the cellForRowAtIndexPath it will place a UILabel over the one row's cell tha...
The documentation confuses me about this. They say:
void NSDecimalCompact (
NSDecimal *number
);
Discussion Formats number so that
calculations using it will take up as
little memory as possible. All the
NSDecimal... arithmetic functions
expect compact NSDecimal arguments.
The last part is important:
All the
NSD...
For example, I try to do something like this:
- (BOOL)compare:(NSDecimal)leftOperand greaterThan:(NSDecimal)rightOperand {
BOOL returnValue = NO;
NSComparisonResult result = NSDecimalCompare(&leftOperand, &rightOperand);
if (result == NSOrderedDescending) { // if the left operand is greater than the right operand
return...
For example:
- (BOOL)compare:(NSDecimal)leftOperand greaterThan:(NSDecimal)rightOperand {
NSComparisonResult result = NSDecimalCompare(&leftOperand, &rightOperand);
// rest not important
}
like you can see, the method just receives these two types of NSDecimal, leftOperand and rightOperand. Then it passes them on to a C API fu...
What's wrong with that?
#define AUDIO_NOTES_FOLDER [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/myApp/Pictures"]
NSFileManager *NSFm= [NSFileManager defaultManager];
BOOL isDir=YES;
if(![NSFm fileExistsAtPath:FILEPATH isDirectory:&isDir])
if(![NSFm createDirectoryAtPath:FILEPATH attributes:nil])
NSLog(@"E...
I have a BOOL value inside my @interface definition in my .h file. Here it is below. It has the same problem whether it's a pointer or not.
@interface myCustomViewController : UIViewController <UIWebViewDelegate> {
{
//...more iboutlets defined above
BOOL *myBoolVariableName;
}
When I compile, I get "error: property 'myBoolVariabl...
Hi,
I am using a UITextView and enabling paging (in both IB and programatically toggling it on and off). There's a lot of text and when scrolling with paging enabled sometimes the first and/or last line of the currently viewable text ends up halfway in view and half out of view at the bottom or top of the frame so you can only see the t...
I'm trying to get MGTwitterEngine to work for the iPhone SDK. I've followed the read me below and now I keep getting the following errors:
TCDownload.h: No such file or directory
yajl_parse.h: No such file or directory
Now, I've done a search on my system and don't have either one of them. So am I missing something? Also, I've downloa...
does javascript on iphone mobile safari support xpath? I am using libxml2 to parse xhtml files in objective-c, but want to be able to change my parsing logic on the fly. Was considering using UIWebview's stringByEvaluatingJavaScriptFromString: method.
...
In the iPhone docset for NSDate, in the discussion area they discuss -dateWithNaturalLanguageString:locale:, however they don't document the method elsewhere on the page.
I've used the method before for iPhone and it worked just fine, although I got warnings. Now that I'm building with -Werror (which I should have been doing all along ^...