Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

ZZGridView - UITableView + image grid view + sections support

ZubiZubiZubiZubi Posts: 60Registered Users
edited August 2011 in iOS SDK Development
All,
I had the need for UITableView with grid + section support recently for my app "Gandhi Nation" (in appstore now). I couldn't find anything readily available. So I started with UITableView and customized the cell.

Thought you might be interested. So I separated the code into standalone project that you can download and use it if interested.

To see the demo, unzip the file and open/run the project in XCode.

Here is the link to get source code.

zzgridview.png
Post edited by ZubiZubi on
<div align="center"><b><font color="Blue">My Apps in AppStore</font> </b> <a href="http://itunes.apple.com/us/app/gandhi-nation-all-india-news/id398855056#" target="_blank">gandhination.png</a> <a h
· ·

Replies

  • AnilNaiduAnilNaidu Posts: 3New Users
    edited August 2011
    Hi,

    i want to call "thumbnail images" dynamically in place of "button".I used the following code and not able to call images dynamically.

    UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.mysite/bg.png"]]];
    [imageView setImage:image];

    ZubiZubi wrote: »
    All,
    I had the need for UITableView with grid + section support recently for my app "Gandhi Nation" (in appstore now). I couldn't find anything readily available. So I started with UITableView and customized the cell.

    Thought you might be interested. So I separated the code into standalone project that you can download and use it if interested.

    To see the demo, unzip the file and open/run the project in XCode.

    Here is the link to get source code.

    zzgridview.png
    · ·
  • AnilNaiduAnilNaidu Posts: 3New Users
    edited August 2011
    How to get "different images" in place on same "button".These images should become full view after cliking the button.




    AnilNaidu wrote: »
    Hi,

    i want to call "thumbnail images" dynamically in place of "button".I used the following code and not able to call images dynamically.

    UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.mysite/bg.png"]]];
    [imageView setImage:image];
    · ·
  • dany_devdany_dev Posts: 4,696Tutorial Authors, Registered Users @ @ @ @ @
    edited August 2011
    i haven't downloaded it, but I think that you should look where it create the cell and probably each UIImageView has a unique tag, so take the UIImageView with tag x of the cell y, and set an image to it, don't use dataWithContentsOfURL that block the main thread and so the UI during download, instead use NSURLConnection or ASIHTTPRequest to download images.
    · ·
  • AnilNaiduAnilNaidu Posts: 3New Users
    edited August 2011
    I tried to call images in place of buttons but application is crashing .

    These images i called from NSURL in Loadview method

    NSData* imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.techieask.com/wp-content/uploads/2010/12/Sony-Ericsson-Xperia-X81.jpg"]];

    UIImage* image = [[[UIImage alloc] initWithData:imageData] autorelease];
    [imageData release];


    [self performSelectorOnMainThread:@selector(displayImage:) withObject:image waitUntilDone:NO];


    application is crashing
    · ·
Sign In or Register to comment.