i want to make an tabbed browser for the iphone.. how do i store uiwebviews in an array and open it with an button like in safari?
A:
no need to store UIWebViews, all you need to store is the address of the web-site. You can store them in user defaults NSUserDefaults;
as for opening then in tabs of UITabBarController you can use:
_controller is your tab bar controller and viewController is the controller which contains UIWebView as a view (viewController.view = yourWebView)
NSMutableArray *array = [NSMutableArray arrayWithArray:_controller.viewControllers];
[array addObject:viewController];
_controller.viewControllers = array;
but if you want to open new pages like safari does you will need to use transformations:
[UIView beginAnimations];
// change coordinates of the view
[UIView commitAnimations];
Alexander Voloshyn
2009-09-07 17:08:11