이 페이지는 AI로 자동 번역되었으며 부정확한 내용이 포함될 수 있습니다. 번역 오류를 신고하려면 페이지 오른쪽 목차 아래에 있는 피드백 기능을 사용하세요.

경고
앱보이키트 (Objective-C 소프트웨어 개발 키트라고도 함)는 더 이상 지원되지 않으며 Swift SDK. 새로운 기능, 버그 수정, 보안 업데이트 또는 기술 지원은 더 이상 제공되지 않지만 메시징 및 분석은 정상적으로 계속 작동합니다. 자세한 내용은 새로운 Braze Swift 소프트웨어 개발 키트 소개 를 참조하세요.
방향 사용자 정의
모든 인앱 메시지의 방향 설정하기
모든 인앱 메시지에 고정 방향을 설정하려면 ABKInAppMessageUIController에서 supportedOrientationMask 속성정보를 설정하면 됩니다. 앱 호출 후 다음 코드를 startWithApiKey:inApplication:withLaunchOptions: 에 추가합니다:
1
2
3
4
// Set fixed in-app message orientation to portrait.
// Use UIInterfaceOrientationMaskLandscape to display in-app messages in landscape
id<ABKInAppMessageUIControlling> inAppMessageUIController = [Appboy sharedInstance].inAppMessageController.inAppMessageUIController;
((ABKInAppMessageUIController *)inAppMessageUIController).supportedOrientationMask = UIInterfaceOrientationMaskPortrait;
1
2
3
4
5
// Set fixed in-app message orientation to portrait
// Use .landscape to display in-app messages in landscape
if let controller = Appboy.sharedInstance()?.inAppMessageController.inAppMessageUIController as? ABKInAppMessageUIController {
controller.supportedOrientationMask = .portrait
}
이렇게 하면 기기 방향에 관계없이 모든 인앱 메시지가 지원되는 방향으로 표시됩니다. 기기의 방향이 인앱 메시지의 orientation 속성정보에서도 지원해야 메시지가 표시됩니다.
인앱 메시지별 방향 설정
또는 메시지별로 방향을 설정할 수도 있습니다. 이렇게 하려면 인앱 메시지 위임자를 설정하세요. 그런 다음, beforeInAppMessageDisplayed: 위임 메서드의 ABKInAppMessage에서 orientation 속성정보를 설정합니다.
1
2
3
4
5
// Set inAppMessage orientation to portrait
inAppMessage.orientation = ABKInAppMessageOrientationPortrait;
// Set inAppMessage orientation to landscape
inAppMessage.orientation = ABKInAppMessageOrientationLandscape;
1
2
3
4
5
// Set inAppMessage orientation to portrait
inAppMessage.orientation = ABKInAppMessageOrientation.portrait
// Set inAppMessage orientation to landscape
inAppMessage.orientation = ABKInAppMessageOrientation.landscape
기기 방향이 인앱 메시지의 orientation 속성정보와 일치하지 않으면 인앱 메시지가 표시되지 않습니다.

참고
iPads의 경우 인앱 메시지는 실제 화면 방향과 관계없이 사용자가 선호하는 방향 스타일로 표시됩니다.
메서드 선언
자세한 내용은 다음 헤더 파일을 참조하세요:
New Stuff!