tags:

views:

9

answers:

2

i'm doing my first iPAD project. i've recently learnt objective C so i do not have in depth knowledge of it. I'm writing a code to generate subviews. Similar concept to that of "SAFARI". i've to keep a track of all the recently opened url and display that web page as a subview.

A: 

You can access subviews of a view in array style like [[self.view subviews] objectAtIndex:0]

So you could create an array of e.g. dictionaries if you need more than just the url.

E.g. you could store url, last visit, title etc.. in a dictionary and then add it to an array.

Hope this can help you!

Cheers mate.

objneodude
thanks a lotttplz could u tell me how i can read a html file through my program ? i'm unable to fetch the url from it
priyanka
A: 

After creating the UIView (with or without a UIViewController) you can add the subview to the original view by typing

[self.view addSubview:myNewView];

(don't forget memory management if necessary). If you use a viewController, you'll need to do:

[self.view addSubview:myNewViewController.view];

You MUST set the "frame" variable of the new view if it is going to work. This is done as so:

[myNewView setFrame:CGRectMake(x, y, width, height)];

G'luck.

H

Helen
thanks a lottt..... plz could u tell me how i can read a html file through my program ? i'm unable to fetch the url from it
priyanka