매개 변수를 사용하고 데이터베이스를 업데이트하기 위해 SQL 쿼리를 실행하는 메소드가있는 Java Java Webservice가 있습니다. 물론 매개 변수는 아이폰에서 URL로 삽입되며 url을 실행하면 웹 서비스 메서드를 호출하여 데이터베이스를 업데이트합니다. 있는 NSURLConnection 예ios에서 시작 URL
-(void)updateInfo
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Updating Profile" message:@"Your data have been saved." delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alert setTag:02];
[alert show];
}
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
GlobalObjects *global = [[GlobalObjects alloc]init];
NSString *url =[NSString stringWithFormat:@"%@/profile/login/update/%@/%@/%@/%@/%@/%@/%@",global.domain,self.user, self.firstName.text,self.address.text,self.city.text,self.country.text,self.zipCode.text,self.phone.text];
if (alertView.tag == 02 && buttonIndex != alertView.cancelButtonIndex) {
// The URL execution method should come here.
}
}
NSURLConnection을 사용하십시오. 또는 AFNetworking 라이브러리를 고려하십시오. – rmaddy
나는 그것도 들여다 보았다. 그러나 그것을 정확히 사용하는 방법을 알아 내지 못했습니다. 예를 게시 할 수 있습니까? –
웹에는 많은 예제가 있습니다. 어떤 종류의 검색을 실행 했습니까? – Abizern