Skip to content

Commit

Permalink
JFMinimalNotificationで非公開API警告 #29
Browse files Browse the repository at this point in the history
  • Loading branch information
anzfactory committed Mar 5, 2015
1 parent 0e576cd commit 066754c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
13 changes: 9 additions & 4 deletions Libraries/ObjC/JFMinimalNotification/JFMinimalNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,15 @@ typedef void (^JFMinimalNotificationTouchHandler)(void);

@protocol JFMinimalNotificationDelegate <NSObject>

/*
アーカイブしてバリデートかけると、非公開apiの警告が出る didDismissNotification
ってことで、名前変える (2015.03.05)
*/

@optional
- (void)willShowNotification:(JFMinimalNotification*)notification;
- (void)didShowNotification:(JFMinimalNotification*)notification;
- (void)willDisimissNotification:(JFMinimalNotification*)notification;
- (void)didDismissNotification:(JFMinimalNotification*)notification;
- (void)willShowMinimalNotification:(JFMinimalNotification*)notification;
- (void)didShowMinimalNotification:(JFMinimalNotification*)notification;
- (void)willDisimissMinimalNotification:(JFMinimalNotification*)notification;
- (void)didDismissMinimalNotification:(JFMinimalNotification*)notification;

@end
16 changes: 8 additions & 8 deletions Libraries/ObjC/JFMinimalNotification/JFMinimalNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ - (BOOL)isReadyToDisplay
- (void)show
{
if (self.isReadyToDisplay) {
if (self.delegate && [self.delegate respondsToSelector:@selector(willShowNotification:)]) {
[self.delegate willShowNotification:self];
if (self.delegate && [self.delegate respondsToSelector:@selector(willShowMinimalNotification:)]) {
[self.delegate willShowMinimalNotification:self];
}

[self.superview removeConstraints:self.notificationVerticalConstraints];
Expand Down Expand Up @@ -201,8 +201,8 @@ - (void)show
self.dismissalTimer = [NSTimer scheduledTimerWithTimeInterval:self.dismissalDelay invocation:dismissalInvocation repeats:NO];
}

if (self.delegate && [self.delegate respondsToSelector:@selector(didShowNotification:)]) {
[self.delegate didShowNotification:self];
if (self.delegate && [self.delegate respondsToSelector:@selector(didShowMinimalNotification:)]) {
[self.delegate didShowMinimalNotification:self];
}
}];
} else {
Expand All @@ -212,8 +212,8 @@ - (void)show

- (void)dismiss
{
if (self.delegate && [self.delegate respondsToSelector:@selector(willDisimissNotification:)]) {
[self.delegate willDisimissNotification:self];
if (self.delegate && [self.delegate respondsToSelector:@selector(willDisimissMinimalNotification:)]) {
[self.delegate willDisimissMinimalNotification:self];
}

if (self.dismissalTimer) {
Expand All @@ -226,8 +226,8 @@ - (void)dismiss
[UIView animateWithDuration:0.6f delay:0.0f usingSpringWithDamping:0.7f initialSpringVelocity:0.3f options:UIViewAnimationOptionAllowAnimatedContent animations:^{
[self layoutIfNeeded];
} completion:^(BOOL finished) {
if (self.delegate && [self.delegate respondsToSelector:@selector(didDismissNotification:)]) {
[self.delegate didDismissNotification:self];
if (self.delegate && [self.delegate respondsToSelector:@selector(didDismissMinimalNotification:)]) {
[self.delegate didDismissMinimalNotification:self];
}
}];
}
Expand Down
2 changes: 1 addition & 1 deletion QiitaCollection/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
Expand Down

0 comments on commit 066754c

Please sign in to comment.