I have been trying to check whether an NSInteger is odd or even. I have found a way to do it using C but it doesn't work with Objective-C. How would I do this?
I have a property defined in a class like so:
@interface myClass
UIImageView *drawImage[4];
...
@property (nonatomic, retain) UIImageView **drawImage;
...
@synthesize drawImage; // This fails to compile
I have found similar questions on StackOverflow and elsewhere, but none that really address this issue. What is the most Objective-C kosher way to do this?
I use GNUStep to compile Objective-C on Windows 7 using GCC and MinGW. I'd like to be able to automate the "make" instruction (with make files) from Notepad++ and have any complier errors reported to Notepad++s console window.
Does anyone have any experience with this?
Rich
In objectivec (iphone) are the nib files (xib) the View part of the MVC?
When you set a property of an object in IB where is that actually stored in the xib file?
What is the most efficient way to port an iPhone app to Android? I know Apple doesn't like 3rd-party, non-Objective C platforms generating code for their platform ... but is there something out there that can take an iPhone app and convert it to Android friendly code?
If not, how have folks out there been creating Android versions of their existing iPhone apps?
Thanks
Is there a way in objective-c/Cocoa to alloc an object when the class name isn't know until run-time. I seem to remember something about this a while ago, but can't find anything on it now.
Something like:
[[@"MyClass" alloc] init];
I seem to recall a function that would return some kind of class id based on a string that can then be used to alloc the object.
I know how to replace text in a string. But that's using keyboard (ASCII) characters. In ObjectiveC, how do I indicate a degree symbol? Also, how do I get the ASCII code for a character?
This is Objective-C, in Xcode for the iPhone.
I have a method in main.m:
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
//I want to call the method here//
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
static BOOL do_it_all () {
//code here//
}
How do I call the do_it_all method from main.m?
i am new to cocoa and objective-c and creating small application having few NStextFields on the window.I have create custom NSformatter to validate the inputs,at some instance i want to get the NStextField within my custom NSformatter to change its backcolor to red to notify user for wrong input value.I didn't getting how to get the currently selected/focused NStextfield for which i want to change backcolor.
I need to be able to send text from the clipboard to an application I'm writing (in Objective-C) via AppleScript. Obviously I need to make my application scriptable (I'm currently reading the Apple Docs about this) but is this possible/easy-to-implement?
I need to write an app which can observe and manipulate the positions of windows on screen, and I've been told that this requires using Cocoa's Accessibility API.
Unfortunately I'm a Java programmer, and ObjectiveC scares me ;) Is it possible to access this Cocoa API from within Java? I know that back when Apple cared about Java it maintained a "bridge" to cocoa, but I'm not sure if this does what I need.
Oh, and my IDE is Eclipse, in case that is relevant.
I assume that on a 32-bit device like the iPhone, assigning a short float is an atomic, thread-safe operation. I want to make sure it is. I have a C function that I want to call from an Objective-C thread, and I don't want to acquire a lock before calling it:
void setFloatValue(float value) {
globalFloat = value;
}
I read a lot, also here, but couldn't find a simple way to do it:
In objectivec -
I have a big UIImage and a small UIImageView. I want to programmatically shrink the content of a UIImage just enough to fit the smaller dimension within the UIImageView. The larger dimension will be cropped, and the result will be the maximum I can get from an image without changing the proportion.
can you please help me?
My programming experience is limited to xhtml, css, php, sql and some javascript. The books I have are:
Programming in Objective-C 2nd Edition
Beginning iPhone Development
Cocoa(R) Programming for Mac(R) OS X (Paperback)
Is there anything else I will need to get started on my journey into iPhone/OS X development?
Hi out there,
i'm trying to get the latest podcast informations out of "itunes store" to work with this data in several applications (iphone app and web app).
Is there a way to get this informations? RSS, JSON or something?
i want to work with this informations in objective-c and on a website with php or js.
Is my question clear? :(
I am trying to build an app on iphone where I have to upload text and image to my server. I am a little bit confused with touchjson and objective-c.How will I be able to upload something. What exactly should I do???
Hi all,
I need to get the binary data of a download link.
When I run this link in the browser it always starts download manager. Rather I would like to copy that binary and display it on teh browser. How is this possible in any language.
Objectivec or c# preferred.
Thanks
Hi All,
I know that there is the PyObjC bridge is OSX and what I want to do is to put a python application/script in the rightclick context menu of OS X. there is the OnMyCommand plugin but I dont think that supports python. I've had a look at how to do it in Carbon/ Objective-C and i'll admit it im a wuss and am just not smart enough yet to grok how to do it (I aint even close to groking it actually.)
Anybody got any idea's on how I might go about this?
Cheers
I'm trying to build the first program in Aaron Hillegass's book: Cocoa(R) Programming for Mac(R) OS X (3rd Edition). The problem I'm having is that I can't my Interface object to "spawn" for lack of a better term unless I build and run the program. Herein lies the problem. While the program is running I can't connect the code to the interface. I'm coding in objective - c on a mac
I have a 5 bit integer that I'm working with. Is there a native function in Objective-C that will let me know which bit is the leftmost?
i.e. I have 01001, it would return 8 or the position.
Thanks
Hello All,
I am very new to the Mac platform and Objective-C in general and in my application I would like to know how to determine that a user is logging out and perform some actions prior to this. Any info or pointers for this will be greatly appreciated.
Regards,
-Jim
Although iPhone support JSON natively, and easy to consume RESTful services, AMF is a binary protocol and it supposes to use much less bandwidth. Do you think using AMF + Flash remoting is a good idea?
Just found this AMF library in cocoa (Objective-C): http://github.com/nesium/cocoa-amf/