how to display image in UIImageView in a specifc block of window in iphone

Discussion in 'iOS Programming' started by mark.p, Nov 27, 2012.

  1. mark.p macrumors newbie

    Nov 27, 2012
    i have a window in which i want to display an image in a specific block of that window. The image is retrieved from the local XML file. I parsed the XML file and got the image value in log, but i don't know how to put it in that specific block. The below image pasted for the reference.


    The arrow mark represents that within this UIImageView i need to get the image. Also i have a doubt that do i need to mention any name for reference to UIIMageView in storyboard.

    Am posting my parser code here,

    NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Sample.xml"];
    NSData *data = [[NSData alloc] initWithContentsOfFile:path];
    NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:data];
    [xmlParser setDelegate:theParser]
    After this am using this code for getting image,
    UIImage *image = [UIImage imageWithContentsOfFile:@"/Users/administrator/Desktop/imageApp/resources/Main_pic1.png"];
    from this i dont know how to go. Kindly suggest me an idea
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007

Share This Page