intent:// 프로토콜을 사용하여 App을 바로 실행시켜야 하는 프로젝트였으나, facebook app에서만 공유된 링크를 눌렀을 때 '페이지를 읽어들일 수 없습니다'라는 alert만 뜨고 동작하지 않았다.


여러 방법을 써봤지만 페이스북 웹뷰안으로 들어가면 market:// 프로토콜 말고는 새창도 뜨지 않음.

정말 힘겨웠지만 아래와 같이 해결.



1. 페이스북에 앱정보 등록


2. 공유할때의 메타태그 추가


<meta property="al:android:url" content="exampleapp://view?menu=12&idx=xxx">
<meta property="al:android:package" content="com.pk.example">
<meta property="al:android:app_name" content="exampleapp">
<meta property="og:title" content="Example Title" />
<meta property="og:type" content="website" />


<관련자료>

1. https://developers.facebook.com/docs/applinks/android

2. https://developers.facebook.com/docs/applinks/add-to-content

3. https://developers.facebook.com/docs/applinks/overview

4. http://applinks.org/documentation/


Posted by august5pm
,

jQuery에서 터치 이벤트를 사용하는데 계속 undefined가 떴다.

분명 예전에 사용했던 코드 그대로 사용했는데...그 때는 잘 됐었는데....


1. 예전에 사용한 코드 (event.touches undefined)

$(document).on("touchstart", function(e){
     console.log(e.touches[0]) // undefined
});


2. event.touches의 사용이 가능한 코드

$(document).on("touchstart", function(e){
     console.log(e.originalEvent.touches) 
     // TouchList{0:Touch, length:1, item:function}
});


출처 : http://stackoverflow.com/questions/7923609/event-touches-is-always-undefined

Posted by august5pm
,

TweenLite로 스크롤 애니메이션 사용하는 방법


플러그인 경로 : https://greensock.com/ScrollToPlugin


1. js 임베드

<script type="text/javascript" src="js/vendor/TweenLite.min.js"></script>
<script type="text/javascript" src="js/vendor/plugin/CSSPlugin.min.js"></script>
<script type="text/javascript" src="js/vendor/plugin/ScrollToPlugin.min.js"></script>



2. 사용방법

//scroll to 400 pixels down from the top
TweenLite.to(window, 2, {scrollTo:{y:400}, ease:Power2.easeOut});



Posted by august5pm
,

액션스크립트 할 때 자주 쓰던 일차함수


x가 a부터 b까지 변할때

y가 c부터 d까지 변한다


y=(d-c)/(b-a)*(x-a)+c


Posted by august5pm
,

오늘 프로젝트를 진행하면서 최초 init()이 실행되고, 


jQuery에서 $(selector).scrollTop()을 사용해야 하는 경우가 있었습니다.


그러나 아무리 value를 넣어도 적용되지가 않아 OTL


머리를 한참 쥐어 뜯다가 혹시...혹시!!!! 


setTimeout(function(){}, delay)으로 딜레이를 주었더니 움직이네요.


아마도 이미지가 들어간 컨텐츠다 보니까 이미지가 로딩되기 이전에 scrollTop()을 실행하고 있어서


컨텐츠의 높이값을 제대로 가져오지 못하다보니 적용되지 않았던 것 같습니다.


가장 확실한 방법은 컨텐츠가 모두 로딩 완료 되었을 때 적용해 주는 것인 것 같네요.

'프로그래밍 > tip' 카테고리의 다른 글

[tip] GreenShock ScrollToPlugin  (0) 2015.02.06
[tip] 일차함수  (0) 2015.02.05
[tip] SVN E160028 오류  (0) 2015.01.27
[tip] SVN E220001 오류  (0) 2015.01.27
[tip] 웹스톰에서 svn checkout 에러 발생할 때  (0) 2015.01.27
Posted by august5pm
,

Error : E160028 commit failed


SVN E160028 오류가 발생했을 때


업데이트가 오래되어 커밋시 발생하는 오류일 수 있으니


업데이트를 먼저 실행 후 커밋을 하면 된다.


Posted by august5pm
,

Error: 220001 (Item is not readable) Description: Unreadable path encountered; access denied


SVN E220001 오류가 발생 했을 때


SVN Server 설정 파일중에서 


svnserve.conf 파일을 아래와 같이 설정해준다.


[general]

anon-access = none


출처

http://stackoverflow.com/questions/3584643/svn-access-denied-when-comparing-revisions

Posted by august5pm
,

웹스톰에서 svn checkout을 실행했는데 에러가 발생 했을 때 아래와 같이 하여 해결.


File > Setting > Version Control > Subversion 에서 Use command line client 체크를 해제시켜주면 된다.


출처

http://stackoverflow.com/questions/20797443/intellij-idea-subversion-checkout-error

'프로그래밍 > tip' 카테고리의 다른 글

[tip] GreenShock ScrollToPlugin  (0) 2015.02.06
[tip] 일차함수  (0) 2015.02.05
[tip] 최초 시작시 scrollTop() 이 적용되지 않을 때  (0) 2015.01.28
[tip] SVN E160028 오류  (0) 2015.01.27
[tip] SVN E220001 오류  (0) 2015.01.27
Posted by august5pm
,