I have recently asked about autoreleasing a returned quartz object:
http://stackoverflow.com/questions/2819548/autorelease-for-cgmutablepathref
Dave DeLong answered my question that there is no autorelease for quartz (or any NS foundation objects) and I should use the Create Rule. However the naming convention on the document says,
...
I have this code-
/**
Save the web view as a screenshot. Currently only supports saving to
the photo library.
/
- (void)saveScreenshot:(NSArray)arguments withDict:(NSDictionary*)options
{
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGRect imageRect = CGRectMake(0, 0, CGRectGetWidth(screenRect),
CGRectGetHeight(screenRec...
I have a dynamic array of strings, the elements of which I would like to localize. Is there a way to localize the strings without iteration e.g. something like using "makeObjectsPerformSelector". Thank you
...
I have a brand new Objective-C class called test. The test class has an instance variable called someValue, which contains an integer.
I create 5 instances of the test class called aTest, bTest, cTest, dTest and eTest. The appropriate synthesize and property declarations for someValue are in place.
Is there a clean way of returning th...
I have an .xib file connected to a ViewController, which is init'ed as the root controller of an instance of UINavigationController in my appDelegate.
In that view, I have a UISearchBar and a UITableView below it.
When the view loads up, there's a navigationBar at the top, followed by a ~20 pixel gap, and then the UISearchBar, and th...
Hi
Have anyone tried to use the SDK4's SMS composer?
If anyone's got some reference or source code please put in here
Thanks
...
I have this UIView class.
It has 4 Views in it:
self.view. The view of the class
itself.
Above that twitterButtonView that holds:
A UIImageView of a button.
Above that a hidden view of the back of the button.
The self.view has a frame of (30, 380, 68, 66);
I want to be able to tab the button and then it scales up accompanied by ...
I am writing a simple library using ASIHTTPRequest where I am fetching
URLs in an async manner. My problem is that the main function that I
have written to test my lib exits before the async calls are finished.
I am very new to Obj C and iPhone development, can anyone suggest a
good way to wait before all the requests are finished i...
Hi, for some reason I can't get my tableview to enter editing mode. It's a little harder than it might seem because I'm using some open source code to make a calendar (iCal esque) with a tableview under it, and it's not quite as straightforward as just using a regular tableview.
Basically, I have two classes. One (let's say Class A) is...
Just doing some research on searching for a character or word within a NSString and I came across this code snippet (which works like a charm):
return [sourceString rangeOfString:searchString].location != NSNotFound;
Am I right in thinking that the above code is functionally identical to:
NSRange range = [sourceString rangeOfString:s...
I have a json response coming and i need to get all the values whose keys are a particular string... for e.g : www_name, www_age etc are coming in the nsmutabledictionary as keys now i want to search all those values having "www_" as their part of the string.
...
Hello - have been stuck on this for days now- How can I loop every node in an XML document and change the text value of the node.
For example go from this:
<root>
<node1>some text</node1>
<node2>
<node3>some more text</node3>
</node2>
</root>
to something like:
<root>
<node1>updated text</node1>
<node2>
<...
I know that when parsing XML with objective-c most of the time you use NSXMLParser.
But what if you only need to read one element. Using NSXMLParser sounds like an overload to me.
The issue is that flickr API doesn't use JSON as response when uploading an image. So my response now is:
<rsp stat="ok">
<photoid>4638598522</photoid>
</rsp...
I have a class (MyClass) with a lot of methods. Consequently, the .m file has become quite difficult to read. I'm relatively new to Objective-C (having come from REALbasic) and I was wondering if it's possible to put some of the methods in MyClass into different files and then include them in the class. How would I go about this in Xcode...
Hello, all!
I feel it's quite a naive question I'm going to ask. Excuse me if it's foolish.
I have made an iPhone game using Cocos2d, Box2d and OpenGL. I want to show the game to a potential employer for demonstration purposes, without giving him the source code.
How can I make a .exe or .app file from the Xcode project?
I've searched...
Hi everyone, iPhone SDK question for you.
I've created a UIViewController category to shift a view up when UITextFields are being edited and the keyboard appears, blocking the fields. I found the code online and no doubt you iPhone gurus are familiar with it. The interface looks like this:
@interface UIViewController (Shiftable)
...
Hi guys,
I need a help from ur side for this.
actually I am having string like:
NSString *str = @"Helloworld.123 456";
I need to get the characters one by one from the string and check whether it is an numeric value.
Is there any predefined method for this??
can anyone help to get out of his.
Anyone's help will be much appreciate...
Hello,
I just started with Objective-C and I would like to understand the meaning of the following lines of code as I see it everywhere in objective-c but I'm not quite getting it 100%:
- (id)initWithName:(NSString *)name;
I understand that the above line is a instance method passing one argument, what I don't understand is (NSString...
I get this warning when I start debugging. Does anyone know why it's looking in /dev/null for my history.
I know it's some path which was mis-set somewhere but I do not know which?
Any help.
How can I see which environment parameters are passed to GDB by XCode?
...
Hello,
I have difficulties displaying objects coming from CoreData in a tableView.
I have 2 sorts of entities : Sample and SampleList. What is important to know is that a SampleList has an attribute sampleSet which is a set of samples (entity of Sample)
First I succeeded in displaying every SampleList. Here is viewDidLoad:
NSFetchRequ...