강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

Seung Yoon Lee님의 프로필 이미지
Seung Yoon Lee

작성한 질문수

iOS AutoLayout을 활용한 실전 UI구성 전략 - 카카오톡 같은 고급 UI 만들기

basic12_align

버튼에 이미지 추가?

작성

·

238

0

i'm sorry that i can only type in English because I am in the states.:((

Since what you are doing is to simpully put an image on top of a button, are there any other better ways to incorporate the image to the button while still maintaining the gesturerecognizer of the button? From my experience if there were any taps on the image part of the button the tap would not trigger the function specified from the gesture recognizer code. you can reply to me using korean and I would understand. Thank you!

답변 1

0

iOS Developer - 이정님의 프로필 이미지
iOS Developer - 이정
지식공유자

안녕하세요.

버튼위에 이미지를 올려 놓으면 이미지 interactionEnable을 false로 하면 아래에 있는 버튼이 눌리게 됩니다.

또는 버튼 뒤로 이미지를 두고 버튼을 투명으로 하는것도 좋을 것 같네요.

Seung Yoon Lee님의 프로필 이미지
Seung Yoon Lee

작성한 질문수

질문하기