내 app.Im 내 app.Im 네비게이션 controller.when 내가 특정 행을 선택하는 응용 프로그램을 구축하고 관련 URL을 loaded.it 괜찮아요 일하고 있습니다.이 뷰에서 이전보기로 돌아가려면 어떻게됩니까? 하이퍼 링크 창을 닫는 방법?
내가- 을 selectrowmethod 않았다에 다음 코드를 배치 ..... 내가보기의 탐색 모음의 상단을 배치하려고하지만 u는 저를 도와주세요 visible.could되지 않는다 (무효) tableView : (UITableView *) tableView didSelectRowAtIndexPath : (NSIndexPath *) indexPath {
// 선택한 쿠폰 가져 오기 ntry NSString * selectedCountry = [listOfItems objectAtIndex : indexPath.row];
// NSString * url = @ "" ";
경우 (indexPath.row == 0) {//[email protected]"http://www.osha.gov/dcsp/osp/stateprogs/alaska.html "; //label.text=url; NSLog (@ "======"); NSURL * url = [[NSURL 할당] initWithString : @ "http://labor.state.ak.us/lss/oshhome.htm"]; [[UIApplication sharedApplication] openURL : url]; // self.label.text = @ "url"; // NSLog (@ "++++++ : % @", self.label.text); //[email protected] "url";
한다} else
경우 (indexPath.row == 1) {
NSURL URL * = [NSURL의 ALLOC] initWithString @ "http://www.ica.state.az.us/ADOSH/""]; [[UIApplication sharedApplication] openURL : url];
//[email protected]"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html "; } 다른 경우 (indexPath.row == 2) {
NSURL URL * = [NSURL의 ALLOC] initWithString : @ "http://www.dir.ca.gov/occupational_safety.html"]; [[UIApplication sharedApplication] openURL : url];
//[email protected]"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html "; 한다} else
경우 (indexPath.row == 3) {
NSURL URL * = [NSURL의 ALLOC] initWithString @ "http://www.ctdol.state.ct.us/osha/ osha.htm "]; [[UIApplication sharedApplication] openURL : url];
//[email protected]"http://www.osha.gov/dcsp/osp/stateprogs/arizona.html "; } }
코드에 코드 태그를 사용하면 더 많은 사람들이 기꺼이 도와 드리겠습니다. – starcorn
당신이 뭘 원합니까? [[UIApplication sharedApplication] openURL : url]; 사파리 앱이 열리나요? 나는 당신이 UIApplicationDelegate Protocol Reference를 읽을 필요가 있다고 생각한다. –
선생님, 내가하고 싶은 것은 행을 선택하면 해당 URL을 열어야한다는 것입니다.내가 왜 didselectrow 메서드에서 URL을로드했는지 .UIApplicatonDelegate Protocol 참조를 발견했습니다. 그리고 (BOOL) 응용 프로그램 : (UIApplication *) 응용 프로그램 handleOpenURL : (NSURL *) url ......이 메서드가 도움이됩니까? 나는 delegate.but에서 이것을 사용하려고 노력했다. .. 내가 어디가 잘못되었는지 말해 주겠다. – Alekhya