10May/101
iPhone SDK Features {SMS, CALL, BROWSER, EMAIL, MAP}
사파리 브라우저로 열기
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://blueb.net"]];
}
이메일 본문 생성
{
NSString *email = [[NSString stringWithString:@"mailto:blog@blueb.net" "cc=your@blueb.net, mail@blueb.net"
"&subject=제목 &body=내용"]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
//openURL로 링크실행
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
}
전화걸기
{
NSLog(@"call msg");
NSString *call = [NSString stringWithFormat:@"tel:010-6952-2673"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:call]];
}
SMS 보내기
{
NSString *sms = [[NSString stringWithString:@"sms:010-2673-6952"]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:sms]];
}
지도보기
{
NSString *map = [[NSString stringWithString:@"http://maps.google.com/maps?q=Daejeon"]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:map]];
}
일부내용 발췌 : be interested in...'s blog
22Apr/100
[CakePHP] Route issue between plugins and links
CakePHP Plugin 개발시 view에서 $html->link() method를 사용하여 특정 컨트롤러로 URL을 생성하는 경우
해당 플로그인을 포함한 링크 URL이 생성이 됩니다.
아래 소스는 member 라는 플러그인에서 $html->link() 를 사용하는 경우입니다.
//http://localhost/member/index (member plugin view)
$html->link('go home',array('controller'=>'boards','action'=>'index'));
위 소스를 적용시
http://localhost/member/boards/index
와 같이 URL 값이 생성이 되어 원하는 경로 이동 할 수 없게 됩니다.
제대로 된 URL은 "/boards/index"가 만들어 져야 합니다.
이문제를 해결하시려면 url 영역에 array('plugin'=>null) 를 추가 하시면 됩니다.
$html->link('go home',array('plugin'=>null,'controller'=>'boards','action'=>'index'));
