i have one problem with my app.Im building an app having navigation controller.when i select a particular row,its related url will be loaded.it is working fine.but how to get back from this view to the previous view?I tried to place a navigation bar top of the view but it is not visible.could u please help me out.....
I placed the following coding in did selectrowmethod
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//Get the selected country NSString *selectedCountry = [listOfItems objectAtIndex:indexPath.row];
//NSString *url=@"";
if (indexPath.row==0) {
//url=@"http://www.osha.gov/dcsp/osp/stateprogs/alaska.html" ; //label.text=url; NSLog(@"======"); NSURL *url = [[NSURL alloc] initWithString:@"http://labor.state.ak.us/lss/oshhome.htm"]; [[UIApplication sharedApplication] openURL:url]; // self.label.text=@"url"; // NSLog(@"++++++:%@",self.label.text); //textView.text=@"url";
}
else if(indexPath.row==1) {
NSURL *url = [[NSURL alloc] initWithString:@"http://www.ica.state.az.us/ADOSH/"]; [[UIApplication sharedApplication] openURL:url];
//url=@"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html"; } else if(indexPath.row==2) {
NSURL *url = [[NSURL alloc] initWithString:@"http://www.dir.ca.gov/occupational_safety.html"]; [[UIApplication sharedApplication] openURL:url];
//url=@"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html"; }
else if(indexPath.row==3) {
NSURL *url = [[NSURL alloc] initWithString:@"http://www.ctdol.state.ct.us/osha/osha.htm"]; [[UIApplication sharedApplication] openURL:url];
//url=@"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html"; } }