I'm a objective c newbie, and i'm having a bit of problems with memory management, I've read the apple's memory management policies, however i need a bit of clarification here, this is pretty simple i guess, but i would like to ask you if I'm right:
Given this property:
@interface Test : NSObject {
NSArray *property1;
}
@property (no...
I have an idea on how to do this, but I want to make sure I do it right....
I have five data classes. When I use one I typically use all of them (but not always).
Each class has a separate header file. I am getting sick of linking in each header file separately.
What is the best way resolve this issue?
...
I have a view with a subview whose alpha and backgroundcolor I would like to change through the use of declared properties. I have written some code as below and it works fine to change the alpha, but the background color is not changed when the property is set to a new value. Any help would be appreciated please.
@interface MyView ...
I'm planning to do a Cocoa app that requires code syntax to be colored (in all common languages). Instead of writing my own code highlighter/parser, are there any pre-made solutions available?
Thanks
...
Is there a way to open the app store to a specific application?
I tried using something like the following:
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284417350&mt=8&uo=6"]];
But got the following: "Safari cannot open the page because to ...
I am looking for a way to create a scrollViewIsZooming method that is called while zooming is occuring. Does anyone know of a way to do this?
I am wanting to use it to keep the content centered in the scrollView while zooming. If I use the scrollViewDidEndZooming method, the content snaps back to the center after zooming is finished.
T...
I have a UITextField that I want to present to the user with a pre-filled suffix. Obviously, I'd like to have the insertion point set to the beginning of the pre-filled text.
It doesn't seem obvious to me how to do this (there's no insertionPoint property), but is there a tricky way to get this done?
...
I set a property with this declaration:
@property (nonatomic,retain) NSDictionary *itemData;
to a dictionary with 1 key - val pair. The table view in my view then gets the one value for the dictionary fine as a section header. But when I go back to access that very same value, it is nil.
Any suggestions? I have been working on this f...
The Leaks instrument tells me that I have a leak in this code fragment. Why is this so?
This code fragment is in viewDidLoad().
UINavigationItem *navItem=[self navigationItem];
UIBarButtonItem *addFeed = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addFeed)];
[navItem setRi...
FIrst, thanks to all who responded to my first two questions. I have tried what was suggested and still nothing works. I thought I would create another post with the code that I am using. Just for some background: I am creating a guessing game for my son and I need to change characters form character to decimal to character. I have ...
I am new to Objective C and the iPhone SDK, and am trying to figure out the following as a simple example of displaying a numeric result in a label area:
label.text = [NSString stringWithFormat: @"%d", 55];
This code above displays the number "55" in the label area. However, the following code results in the display of "0" (with calcu...
I know three20 has a PhotoViewController but it seems like overkill to just include the whole framework just to load one picture from one URL. Does anyone know of any code/lib that displays one picture when give one URL?
...
Hi,
I know barely nothing about JSON and I need to send a request to a server and read the data coming from it, using the iPhone only.
I have tried to use the jason-framework
to do that, but after readin the documentations I was not able to figure out how to construct the object and send it on the request. So I decided to adapted anoth...
Hi guys,
I have been scratching my head trying to find any resources on substringing an email address I get from a textfield into getting the first part before the @ symbol. Ive tried looking at the documentation, playing around with the componentsseparatedbyString.
No luck.
Thanks for your help in advance
...
i want to create an app in which i shoot a person from camera.then take only body of person not the background.i know that i need to use image masking.but don't know how to use it.could someone post a sample to do this.
...
Hi,
is it possible to change the width of the leftBarButtonItem of the class UINavigationItem?
The default width is actually to short for my strings and I would like to enlarge the item as I have no title.
Best,
heinrich
...
is there a way we can detect a person's body in the image and cut the only body part of the image.
...
please give me some examples.thanks a lot
...
Is this a valid way to initalize an NSArray with float objects?
NSArray *fatArray = [NSArray arrayWithObjects:
[NSNumber numberWithFloat:6.9],
[NSNumber numberWithFloat:4.7],
[NSNumber numberWithFloat:6.6],
[NSNumber numberWithFloat:6.9],nil];
It works and...
Just say you have a quite large and complicated desktop application written in objective-c/cocoa written properly in MVC. You then wish to replace the V and C so that it is a web application?
Is there anything like Tomcat but for objective c? The closest thing I can think of is somehow convert the Model code into an apache module to lo...