iOS에서 WebView 이용해서 개발 중 빠르게 터치시 ckick 이벤트가 발생하지 않는 현상이 발생
var bClick = false;
$(static_parent).on("mousedown", element, function () {
bClick = true;
}).on("mouseup", element, function () {
if(bClick) {
bClick = false;
// 실행 코드
}
});
또는
$(static_parent).on('touchstart touchend click', function(evt) {
if(evt.type == 'touchstart') {
$(this).data('touch', 1);
$(this).css('background-color', '#f00');
}
if(evt.type == 'touchend' || evt.type == 'click'){
if($(this).data('touch')){
$(this).css('background-color', '#fff');
// 실행 코드
}
$(this).data('touch', 0);
}
});
'Mobile > iOS' 카테고리의 다른 글
[iOS] The app delegate must implement the window property if it wants to use a main storyboard file. 오류 관련 (0) | 2020.10.28 |
---|---|
[iOS] Javascript console.log 찍는 방법 (0) | 2019.01.12 |
[iOS] Guideline 2.3.3 - Performance - Accurate Metadata (0) | 2019.01.12 |
[iOS] iTunse Connect 앱 미리보기 및 스크린샷 사이즈 (0) | 2019.01.11 |
[iOS] 프로그램 역할 및 App Store Connect 역할 (0) | 2019.01.08 |