I am new to iphone development.I am parsing a xml file and displaying the title, date, view and summary in each row of a table.The contents of summary is big ,so only first 3 words are displayed in the cell. I increased the height of the row.Still 3 words are displayed in my cell.How summary should fit properly inside the cell and full c...
Running my app in the simulator under Instruments to check for memory leaks, it seems to be indicating a leak in this block of code:
for (NSDictionary *messageDict in messageDataArray)
{
message = [[Message alloc] init];
... set some properties on the 'message' object
[messages addObject:message];
[message release];
}
...
Hi,
I am relatively new to iphone development. I have looked through the documentation and cannot really find an answer to this problem.
I have a server which I have created and know the ip address and the port it is using. I am now trying to connect to this using an iphone application I am creating. Through the documentation there are...
I am just learning how to setup a multiple picker and I am a little curious about the two labeled sections below:
// METHOD_001
NSInteger row_001 = [doublePicker selectedRowInComponent:0];
NSInteger row_002 = [doublePicker selectedRowInComponent:1];
NSString *selected_001 = [pickerData_001 objectAtIndex:row_001];
NSString *selected...
I have a nib file I want to open up, but it is just an info panel so I dont need any methods for it. Is there a way I can just open it. I am not in a class that is a subclass of NSWindowController.
...
Hey mates,
I am really trying to do my best but I can't really find out what's going wrong in my code. I made a lot of search but I guess I just can't understand some objective c basics ;)
My first question is related to the code below :
[window addSubview:tabBarController.view];
UIImage *image = [UIImage imageNamed:@"lol.png"];
UII...
I have an NSScrollView with an IKImageView inside to display images. This seems to work.
However, if I make the window smaller than the image, the scrollbars appear as they should, but the BOTTOM of the image is locked to the bottom of the window, instead of the top of the image being locked to the top of the window. In other words, I w...
Hi,
I come from the AppleScript land and there we use
alias of (info for thePath)
package folder of (info for thePath)
folder of (info for thePath)
to see if a path is either of the above. But I can't seem to find out how to do it in ObjC/Cocoa. I'm pretty sure it's quite easy but I fail to find any info about it.
Thanks...
...
I'm writing some code that is wrapping up some CFNetwork stuff to do DNS resolution in Objective-C.
Everything is fine and it's working, but I have a few questions:
The callback function prototype for CFHost's asynchronous resolution is passing references to CFStreamError structures even though the documentation says CFStreamError is d...
I hope i did not skip this part in the ObjC manual but is it possible to refer to a class from within one of its class methods?
Like in PHP you would use "this" to refer to the current instance, while "self" refers to the instance's class the ObjC equivalent of "this" would be "self", so what would be the ObjC equivalent of PHP's "self",...
I am pulling down a plist from a URL using an NSURLConnection, which returns an
NSData object. I would like to convert this to an NSArray. Can anyone help me?
I am refactoring a method that currently does a synchronous request to the URL,
using arrayWithContentsOfURL: to get the NSArray.
Thanks!!
...
Hello. I know the iPod touch 1g does not have a speaker like the 2g, and the iPhone, but I do know that it has a small speaker, capable of making various beeps. Is there a way to make the iPod touch 1g beep, or does it only work on 2g and above? If so, what would the code be?
Thanks,
HiGuy
...
The @encode directive returns a const char * which is a coded type descriptor of the various elements of the datatype that was passed in. Example follows:
struct test
{ int ti ;
char tc ;
} ;
printf( "%s", @encode(struct test) ) ;
// returns "{test=ic}"
I could see using sizeof() to determine primitive types - and if it was a full ...
Hello all,
Just a small question...
How is it that you tell the difference between an iPhone header file which you can use in conjunction with iPhone development, or a mac specific header file.
Many thanks,
Stu
...
Given the following code
@interface MyClass
{
SomeObject* o;
}
@property (nonatomic, retain) SomeObject* o;
@implementation MyClass
@synthesize o;
- (id)initWithSomeObject:(SomeObject*)s
{
if (self = [super init])
{
o = [s retain]; // WHAT DOES THIS DO? Double retain??
}
return self
}
@end
...
I want to allow a pushed to set parentViewController's instance variables. For instance, VC1 (the parent) has a bunch of textfields and what not which are filled from VC2 (the child). VC2 is pushed onto the stack by VC1. I've tried doing like parentViewController.myString = "foo"; however since parentViewController is a UIViewController,...
As someone that's new to Objective-C can someone give me an overview of the retain, assign, copy and any others I'm missing, that follow the @property directive? What are they doing and why would I want to use one over another?
Thanks
...
When I try to crop an image using NSImage's imageFromRect, I get an EXEC_BAD_ACCESS crash about 50% of the time. This is something that runs on startup (triggered in an awakeFromNib), so the environment shouldn't be changing. I am not sure why it crashes one one launch and not another. When I have a breakpoint set before I crop the image...
Is it possible to move the coordinate of a MKAnnotation without adding and removing the annotation from the map?
...
Hi guys.
I am using NSURLConnection on the application.
To create HTTP connection, I used following code :
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL
URLWithString:@"http://www.mydomain.com/path/[email protected]"] cachePolicy:NSURLRequestU...