|
@@ -17,6 +17,8 @@
|
|
|
#import "HomeArrangeVideoCourseView.h"
|
|
|
#import "CourseDescAlertView.h"
|
|
|
|
|
|
+#define HIDE_COURSETIPS (@"HIDE_COURSETIPS")
|
|
|
+
|
|
|
#define HEADER_HEIGHT (50)
|
|
|
|
|
|
@interface HomeArrangeCourseController ()<JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate>
|
|
@@ -92,9 +94,11 @@
|
|
|
|
|
|
- (void)displayWithIndex:(DISPLAY_INDEX)displayIndex {
|
|
|
self.displayIndex = displayIndex;
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self showTipsAlert:self.displayIndex];
|
|
|
- });
|
|
|
+ if (UserDefaultBoolForKey(HIDE_COURSETIPS) == NO) {
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [self showTipsAlert:self.displayIndex];
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated {
|
|
@@ -301,6 +305,7 @@
|
|
|
- (void)showTipsAlert:(NSInteger)displayIndex {
|
|
|
[self.tipsAlert displayCourseTypeIndex:displayIndex];
|
|
|
[self.tipsAlert showInView:[NSObject getKeyWindow]];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- (CourseDescAlertView *)tipsAlert {
|
|
@@ -308,9 +313,17 @@
|
|
|
_tipsAlert = [CourseDescAlertView sharedInstance];
|
|
|
_tipsAlert.showType = SHOWTYPE_SKIPMUIC;
|
|
|
[_tipsAlert refreshView];
|
|
|
+ MJWeakSelf;
|
|
|
+ [_tipsAlert hideCallback:^{
|
|
|
+ [weakSelf skipAlert];
|
|
|
+ }];
|
|
|
}
|
|
|
return _tipsAlert;
|
|
|
}
|
|
|
+
|
|
|
+- (void)skipAlert {
|
|
|
+ UserDefaultSetBoolForKey(YES, HIDE_COURSETIPS);
|
|
|
+}
|
|
|
/*
|
|
|
#pragma mark - Navigation
|
|
|
|