objective-c

Create curve shaped Scatterplot using Core plot

How to create a curve shaped scatterplot using core plot ? Now am getting linear shaped Scatterplot. All the examples showing here are in a linear shape. How to do it in curved shape ? Please help me.. ...

Making UITableViewCells bleed over

What I'm trying to achieve might be a bit of a novelty, but maybe someone has already done this or has some great ideas. Here's the situation: I have a UITableView sitting on top of a UIImageView (which provides the background) that has a brushed metal texture. The fist row in the table is colored black. What I'd like to achieve, is the ...

Calculate and display distance between userlocation and known point in Table View

Hi, I have a table view with a list of hotel, and i want put in cell.detailTextLabel.text the distance beetween userlocation and hotel. How can obtain the coordinates of userlocation? I see on web that i need to use CLLocationManager but i don't understand how and where implement in my table view. Then,to get the distance,i do a "getDist...

Is it possible to make an @property private?

Someone said that I could add an private keyword to @property(...) ... really? ...

Export a Quick Model from Xcode?

I was looking for a quick way to generate UML like documentation for my project when I stumbled across the Quick Model menu item in Xcode. I was wondering if there were a way to export these diagrams in a non-platform-specific file format like png or pdf? Basically I want to take some quick visual diagrams (illustrating component relatio...

I cannot swallow Objective-c syntax, any advice?

Hi folks, I know this is a mater of taste, but actually I cannot accept the Objective-c syntax. Any advices so that I can go ahead and learn this language with this freak syntax? Thanks. ...

Supressing warning for a class (trying to simulate an Abstract class in objc)

Hi all! This is the situation. I've been a C++ programmer for ages. I like abstract classes and "interfaces" so I would likt to do the same using objc. I use a protocol for my interfaces, but the problem is that when my abstract class inherits from the protocol (I don't want to implement it here) I get warnings like: warning: method d...

how to resign keyBoard as a firstResponder from a textView??

Hi I want to resign the keyboard from the text view as a first responder.I want as soon as user hits the return key after editing in a textView the keyboard should resign.But I am not sure how should I do this??? ...

Is there anyway to access root on iPhone using NSFileManager?

I was trying to access the root directory and list the contents of it but I got 0 folders listed there. I s there anyway to access it for instance to query the SMS.db under root/SMS folder. Thank you all in advance. ...

Compress/Decompress NSString in objective-c (iphone) using GZIP or deflate

Hi, I have a web-service running on Windows Azure which returns JSON that I consume in my iPhone app. Unfortunately, Windows Azure doesn't seem to support the compression of dynamic responses yet (long story) so I decided to get around it by returning an uncompressed JSON package, which contains a compressed (using GZIP) string. e.g ...

AppDelegate viewController memory leak?

I am just curious with regards to the correct way to create a view controller programatically. When I compile this code with the static analyser I get a leak (as you would expect) from the alloc. Should I just leave it as it needs to stay until the app exits anyways, or is there a cleaner way? - (BOOL)application:(UIApplication *)applic...

UIButtons creating a native-like keyboard behavior.

Greets. A somehow detailed explanation on my problem, and what I have already done, and what I cannot do. I want to create a behavior resembling the one in the iPhone's keyboard. Basically, I want a view to appear when the user taps a button and WHILE the user taps that button. This, I accomplished. When the user lets go of the butto...

How does Undo work?

How does undo work? Does it copy all the managed objects every time any of the values change? Or does it only copy the actual changes together with an information which objects were affected? Is that heavy or lightweight? ...

ObjC: required to optional

Hello Guys! Situation: A protocol A implements a protocol B. B has some @optional and some (@)required methods. Question: Is it possible in protocol A to set a method from B to the opposite (opt. to reeq. and vv.)? Cheers! ...

Drop down view in cocoa

I'm looking to create a 'drop down' view that falls in front of the main window. An example of this would be the window that drops down when you click 'Advanced' in System Preferences->Networking. If someone could point me in the right direction documentation-wise that would be great. Thanks in advance. ...

Objective C - RegexKitLite - Parsing inner contents of a string, ie: start(.*?)end

Please consider the following: NSString *myText = @"mary had a little lamb"; NSString *regexString = @"mary(.*?)little"; for(NSString *match in [myText captureComponentsMatchedByRegex:regexString]){ NSLog(@"%@",match); } This will output to the console two things: 1) "mary had a little" 2) "had a" What I want is just the 2nd bit ...

Is there any difference between BOOL and Boolean in Objective-C?

I know BOOL is actually a typedef of signed char. But what about Boolean? I am confused of bool, Boolean and BOOL.... Q Q ...

How to integrate AdBannerView in Cocos2d

Hello! I'm trying to integrate the new object ADBannerView in my Cocos2d game but the banner apears in vertical on the left of the screen when my game is in landscape. This is my code: UIViewController *controller = [[UIViewController alloc] init]; controller.view.frame = CGRectMake(0,0,480,32); //From the official iAd programming guid...

iphone: NSURLCache on disk

Hi there, I'm having trouble with caching URLResponses to disk. I want that because the data i'm downloading needs reloading when the expires-tag in it's http-header is met, not earlier. Also, I want iPod touch-Users to be able to download the data once while online and then use it offline. i'm doing this which works fine for caching t...

Why doesn't my UIViewController class keep track of an NSArray instance variable.

Hey, I am new to Objective-C 2.0 and Xcode, so forgive me if I am missing something elementary here. Anyways, I am trying to make my own UIViewController class called GameView to display a new view. To work the game I need to keep track of an NSArray that I want to load from a plist file. I have made a method 'loadGame' which I want to l...