2012-07-28 2 views
1

MFMailComposeViewController를 사용하여 응용 프로그램에서 HTML 전자 메일을 보내려고하지만 오른쪽으로 홀수 글자가있는 문제가 발생합니다.MFMailComposeViewController HTML 오른쪽 여백을 제거 하시겠습니까?

</br> 
</br> 
<a href='itms-apps://itunes.apple.com/app/id444395321'> 
<img src='http://brianensorapps.com/whirlworld/wwad.png' height='80' width='320' style='position:relative;left:-10px;margin-right:0px;padding-right:0px;'/> 
</a> 

내가 바로 CSS 태그가 필요 확실하지 않다 : 여기

은 내가 사용하고있어 HTML입니다. 어느 쪽도 지금 일하고 있지 않습니다. 위치 및 왼쪽 태그는 왼쪽 여백을 제거하기위한 것입니다. Issue

또한 내가 MFMailComposeViewController을 제시하기위한 코드를 게시 할 것을 요청하고있다 : 여기

나는 사용자가 내 배너를지나 오른쪽으로 스크롤 할 수있는 피하기 위해 노력하고있어 상황의 사진입니다 : 당신은 왼쪽으로 모든 이동 -10px 왼쪽 여백을 설정하는

sharingVC = [[MFMailComposeViewController alloc] init]; 
sharingVC.mailComposeDelegate = self; 
sharingVC.navigationBar.tintColor = [UIColor lightGrayColor]; 
[sharingVC setSubject:@"Check out this app"]; 
[sharingVC setMessageBody:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sharingEmail.html"] usedEncoding:nil error:nil] isHTML:YES]; 
[self presentViewController:sharingVC animated:YES completion:nil]; 
+0

당신이 당신의 전체 코드를 게시 할 수 :

이 트릭을 할 수 있는가? –

+0

나는 내 코드와 내가 약속 한 그림을 추가했지만 전에 업로드하는 것을 잊어 버렸습니다. – enbr

답변

1

스타일 속성에서

(당신에게 10px의 오른쪽 여백을주는), 012 변경는 left:0px 그래서 HTML 코드는 다음과 같습니다 대답 :

</br> 
</br> 
<a href='itms-apps://itunes.apple.com/app/id444395321'> 
<img src='http://brianensorapps.com/whirlworld/wwad.png' height='80' width='320' style='position:relative;left:0;margin-right:0px;padding-right:0px;'/> 
</a> 

나는 당신이 정말로 무엇을 찾고있는 생각하지만 같이, 절대 0으로 왼쪽 위치를 설정하는 것입니다 위해 :

</br> 
</br> 
<a href='itms-apps://itunes.apple.com/app/id444395321'> 
<img src='http://brianensorapps.com/whirlworld/wwad.png' height='80' width='320' style='position:absolute; left:0px' /> 
</a> 

내 테스트에서, 그것은 수평 스크롤없이 화면의 왼쪽에서 오른쪽으로 진행되는 이미지를 보여줍니다.

+0

매력처럼 일 했으니 덕분에 도와주세요! – enbr

0

모든 여백을 제거하려면 html의 출력을 변경하는 인라인 태그를 포함하는 것이 좋습니다.

<style type="text/css"> 
body {padding:0px;margin:0px;} 
</style> 
</br> 
</br> 
<a href='itms-apps://itunes.apple.com/app/id444395321'> 
<img src='http://brianensorapps.com/whirlworld/wwad.png' height='80' width='320' style='position:relative;left:-10px;margin-right:0px;padding-right:0px;'/> 
</a> 
관련 문제