프로젝트
GitHub에서 보기
kgn/KGModal
소개
KGModal은 어떤 뷰든 모달 팝업에 표시할 수 있는 간편한 드롭인 컨트롤입니다.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalKGModal is an easy drop in control that allows you to display any view in a modal popup. The modal will automatically scale to fit the content view and center it on screen with nice animations!

You supply your own content view and KGModal does the rest:
[[KGModal sharedInstance] showWithContentView:contentView andAnimated:YES];
There are a couple other options but it's purposely designed to be simple and easy to use:
// Determines if the modal should dismiss if the user taps outside of the modal view
// Defaults to YES
@property (nonatomic) BOOL tapOutsideToDismiss;
// Determines if the close button or tapping outside the modal should animate the dismissal
// Defaults to YES
@property (nonatomic) BOOL animateWhenDismissed;
// Determins close button type (None/Left/Right)
// Defaults to Left
@property (nonatomic) KGModalCloseButtonType closeButtonType;
// Determines whether close button will display on the left or right
// Defaults to left
@property (nonatomic) KGModalCloseButtonLocation closeButtonLocation;
// The background color of the modal window
// Defaults black with 0.5 opacity
@property (strong, nonatomic) UIColor *modalBackgroundColor;
// The background display style, can be a transparent radial gradient or a transparent black
// Defaults to gradient, this looks better but takes a bit more time to display on the retina iPad
@property (nonatomic) enum KGModalBackgroundDisplayStyle backgroundDisplayStyle;
// The shared instance of the modal
+ (id)sharedInstance;
// Set the content view to display in the modal and display with animations
- (void)showWithContentView:(UIView *)contentView;
// Set the content view to display in the modal and whether the modal should animate in
- (void)showWithContentView:(UIView *)contentView andAnimated:(BOOL)animated;
// Hide the modal with animations
- (void)hide;
// Hide the modal with animations,
// run the completion after the modal is hidden
- (void)hideWithCompletionBlock:(void(^)())completion;
// Hide the modal and whether the modal should animate away
- (void)hideAnimated:(BOOL)animated;
// Hide the modal and whether the modal should animate away,
// run the completion after the modal is hidden
- (void)hideAnimated:(BOOL)animated withCompletionBlock:(void(^)())completion;
Check out the ExampleApp to see it in action!
###Installation via Cocoapods
Add pod 'KGModal', '~> 0.0.1' to your Podfile and run pod to install.
관련 프로젝트 살펴보기
불러오는 중…