I have a method which runs this:
Track* track = [[Track alloc] init:[obj objectForKey:@"PersistentID"] :[obj objectForKey:@"Name"] :[obj objectForKey:@"Artist"] :(NSInteger*)[obj objectForKey:@"Total Time"] :(NSInteger*)[obj objectForKey:@"Play Count"]];
[self setCurrentTrack:(Track*) track];
[track release];
Do I have to release tr...
I'm trying to write my first iPhone app, and I'm using a date picker object for the user to enter their date of birth. Part of my app requires the year in int format. I've added the code as below. What's odd is that 'month' gets the right value. But day and year seem to be stuck at MAX_INT (2147483647). Can anyone tell me what I'm doing ...
I'm using the following code to submit to a WCF service. I keep getting an error that the key is invalid. I have a webpage on the same server that I submit the same data (but different key) using a FORM POST. It works fine that way. I put the URL below all in a URL (including valid key from server webpage) and get the key is invalid ...
I'm trying to set up a list of items that can be edited. I have a main view, with a UINavigationBar at the top and a UITableView directly under it. I'd like to have my "edit" button change to a "done" button on click, but I can't figure out how to do it.
If I could do it in the code (not it interface builder), I could just replace it, b...
how can i display a image in tableview header section iphone ?
...
Hi,
I confused when i want to take single pointer and when should i take double pointer?
In following structure what exactly did?
struct objc_class {
Class isa;
Class super_class;
const char *name;
long version;
long info;
long instance_size;
struct objc_ivar_list *ivars;
struct objc_method_list **method...
I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color.
What should I do? Anyone please help!
I used the below code:
- (IBAction)sendMail{
MFMailCompose...
How would you? I'm having problems. Thanks.
I'm currently using
if (myString == myfloat) {
// do something but this won't work
}
OR
if ([myString == myFloat]) {
// do something but this won't work
}
Thanks!
...
I've read a number of posts regarding how to detect shakes but I'm not sure:
What is currently the best way to detect shakes?
and -
How to play an audio file ONLY while the user is shaking the iPhone?
Anyone have an advice, examples/tutorials or sample code?
Thanks
...
Hello,
I've been having with an objective-c class which appears to be losing its pointer reference between methods of the same class.
In the MyTableViewController.h file, I declare:
@interface SettingsTableViewController : UITableViewController <UITextFieldDelegate>{
OCRAppDelegate *delegate;
}
MyTableViewController.m file
- (i...
I have two UIImageViews moving like sprites on a superview. Each imageview moves properly by itself but when I put both imageviews on the superview at the same time, their individual movement becomes strangely restricted to two different areas of the screen. They will not touch even programmed to the same coordinates.
This is my moveme...
Hi, I heard that there are applications that allow people to do transactions by just touching there iPhones to each other. How is that archive via code in Objective C?
...
Here is the code I use to draw:
- (void) drawSomething
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 1, 0, 0, 1);
CGContextSetLineWidth(context, 6.0);
CGContextMoveToPoint(context, 100.0f, 100.0f);
CGContextAddLineToPoint(context, 200.0f, 200.0f);
CGContextStrokePat...
Hello people
I am working for the first time with SVG files. I an able to load SVG files on webview but the images are rendering smaller than the original.
they are getting shrinked by a particular factor...... Is there some solution to my problem??? pls help.
Thank You
Meet bhatha
...
Hi,
Why can't I do this, and how could I perform the same behavior in Objective C ?
@interface Test
{
}
- (void)test:(Foo *)fooBar;
- (void)test:(Bar *)fooBar;
@end
Thanks in advance !
...
I know that NSString and CFString are toll-bridge, they can convert in such a way.
CFStringRef cfStr;
NSString* anStr=(NSString*)cfStr;
however,when I convert string in such a case when dealing addressbook
NSString* homeLabel=(NSString*)kABWorkLabel;
then homeLabel is "_$!<Work>!$_";
the other pre-defined CFStringRef in the address...
HI All.
I have subclass of UIScrollView. IN this class I have added some imageView.layer to self.layer. And when I call [imageView.layer setNeedsDisplay] my implemented delegate never called.
-(void)drawLayer:(CALayer*)layer :(CGContextRef)context
I`ve also set
imageView.layer.delegate = self
Could anyone tell me where I must s...
Hello. I'm new to Objective-C, but I am curious about something that I haven't really seen addressed anywhere else.
Could anyone tell me what is the difference between a private variable that is declared at the @interface block versus a variable that is declared within the @implementation block outside of the class methods, i.e:
@inte...
Hi, i have a Quartz Composition with a Cube, and X/Y/Z rotation inputs are published.
On Interface Builder i made a QCView and a QCPatchController with the previous Quartz Composition loaded. In QCView the Patch Controller is binded, and the rotation published ports are binded too to three NSSlider, so when i change the value of the NSSl...
-(IBAction)registerUpdate:(id)sender {
HTTPRequest* request = [[HTTPRequest alloc] initWithUrl:@"http://www.yahoo.com" delegate:self];
[request doRequest];
}
The HTTPRequest makes an asynchronous request and calls the onHTTPResponse method in the current class.
My question is do I have to release request? My guess is that I'm ...