은 내가 ViewDidAppear()
UIPageViewControllerOptionInterPageSpacingKey 값을 변경하는 방법은 무엇입니까?
의 값 UIPageViewControllerOptionInterPageSpacingKey
을 설정하려고하지만 UIPageViewController의 내 초기화 코드는보기가 레이아웃
은 내가 ViewDidAppear()
UIPageViewControllerOptionInterPageSpacingKey 값을 변경하는 방법은 무엇입니까?
의 값 UIPageViewControllerOptionInterPageSpacingKey
을 설정하려고하지만 UIPageViewController의 내 초기화 코드는보기가 레이아웃
의 설정하기 전에 내가 UIPageViewControllerOptionInterPageSpacingKey
을 설정하면 자동 레이아웃에 문제가
ViewDidLoad()
에 초기화시 페이지 간격을 변경해야합니다. XIB/Storyboard 또는 initWithTransitionStyle:navigationOrientation:options:
메서드를 사용하여 @{UIPageViewControllerOptionInterPageSpacingKey : @(5.f)}
을 전달하면됩니다. 이것은 UIPageViewController.h
파일 from Apple에 언급되어 있습니다.
// Key for specifying spacing between pages in options dictionary argument to initWithTransitionStyle:navigationOrientation:options:.
// Value should be a CGFloat wrapped in an NSNumber. Default is '0'.
// Only valid for use with page view controllers with transition style 'UIPageViewControllerTransitionStyleScroll'.
UIKIT_EXTERN NSString * const UIPageViewControllerOptionInterPageSpacingKey NS_AVAILABLE_IOS(6_0);