New to iPhone development, not new to software development in general. I want my Objective-C/iPhone source code to look "unsurprising" to someone else reading it.
Wondering what is the accepted practice for code organization within one class?
As an example, I have a view controller like so:
@interface SomeViewController : UIViewContr...
I've seen some similar questions here on SO, but none recent - so i'm checking in to see if anything's changed.
I see that didReceiveAuthenticationChallenge: is perfectly capable of doing a base64 encode for basic authentication, but the server i need to send a basic auth Authorization: header to doesn't return an HTTP401 and (I assume...
char c1 = 'A';
char c2 = 'F';
char final = (char) c1^c2;
This always return the result i am looking for, but it doesn't work if either c1 or c2 contain special characters.
Any idea what i can change to allow special characters?
Thanks
...
I have a question,
i carefully went through and thoroughly understood the tutorial at
http://developer.apple.com/iPhone/library/documentation/DataManagement/Conceptual/iPhoneCoreData01/Articles/01_StartingOut.html#//apple_ref/doc/uid/TP40008305-CH105-SW1
for iOS Core Data.
The issue was that when i coded everything and run on iOS 4 with...
I am trying to figure out implement a Compose New Message view that works in the same way the Facebook iPhone application does theirs. It's very similar to MFMailCompose and MFMessageCompose but both of those are already set to search through the iPhone's contacts. Facebook's application looks exactly the same except theirs searches thro...
I have an array of unichars i need to convert it to nsstring.
How can i do this?
...
I'm running into an odd quirk involving Core Data, a declared protocol, and perhaps the LLVM 1.5 compiler. Here's the situation.
I have a Core Data model that among others has two classes, IPContainer and IPEvent, with IPContainer being the parent entity of IPEvent. Each entity has a custom class in the project for it, created using m...
Is there any reason adding a UIPicker to a view might somehow rob a programatically created button of its functionality? I initially instantiated a UIButton to take me to a different view, and all was well and fine. Then I went ahead and added a UIPicker to the same view with the purpose of selecting a few key fields which could then b...
Old SDK solution:
- (void)modifyKeyboard:(NSNotification *)notification
{
UIView *firstResponder = [[[UIApplication sharedApplication] keyWindow] performSelector:@selector(firstResponder)];
for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows])
for (UIView *keyboard in [keyboardWindow subviews])
...
Having worked through some tutorials on some basics via the iPhone, I'm struggling to determine how best to structure my code. The book I'm using points out things like "you wouldn't normally put this here, but for expediency...". Well, I'd like to know what one would "normally" do.
My application is somewhat simple - there is a table...
I'm getting the following exception is thrown under iOS 4.0 but not under 3.0 using core data. I'm populating a tableview controller with data from a core data store. Then drilling down on a row and requesting the details for that row and passing them onto a detail view.
FATAL ERROR: The persistent cache of section information does not...
For example, the method:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
in UIResponder has an NSSet* touches as the parameter.
In the method itself, how do I determine what type of object touches actually contain? In this case, it contains a set of UITouch. But I knew that from reading some tutorials online.
In ge...
In Objective-C, you can invoke class methods with:
[MyClass aClassMethod];
And you can query an instance's kind with:
[someInstance isKindOfClass:[MyClass class]];
But, why do we need to do [MyClass class], and not simply provide MyClass like this:
[someInstance isKindOfClass:MyClass];
Is there a reason that the compiler is fine...
I am trying to include the following kernel routine into my Cocoa / objective C project. But I'm getting a compiler error when I build the project. The very first line is flagged with a syntax error saying "expected '=', ',', ';', 'asm' or 'attribute' before 'vec4'.
Any ideas what this means and how to resolve it? As far as I can tel...
Hi,
When we use Graph api in Facebook the results come in the following format. IS there a convenient class built to retrieve them in iphone?
JSON parser?
{
"type": "audiotrack"
"name": "Without Me - Eminem",
"metadata": {
"trackinfo": {
"title": "Without Me",
"artist": "Eminem",
...
hay guys,
I am trying to send a word/text from my iphone application to php page
any idea......?
Thanks in advance
...
I can't see any way to copy an NSView and create an identical NSView object. I see google hits about "use an NSData" but I don't understand that.
...
How can I flip the coordinate system of an NSWindow? I know it has a Content View, but how can I flip the coordinate system of that specific View which is of type NSView?
In a sub-view of my NSWindow's Content View I flip the coordinate system by subclassing NSView, placing that in my window, and in that subclassed NSView I implement me...
As i was changing my code and used another .h and .m files added, i decided this wasnt the best way, so i reverted back to my old code via snapshot feature.
When i did, i ran my code and now i get this
Unknown class AsynchronousImageView in
Interface Builder file.
I looked at all my source code and my UI and there are no links b...
Hi I have seen a few examples of adding breakpoints in gdb using the command fb. I have tried using the following but it doesn't work...
fb -[NSTimer release]
I tried it but it says.
Function "-[NSTimer release]" not defined.
As you can probably tell I want the debugger to stop when release is called on any NSTimer object.
How c...