Skip to content

Commit 223da05

Browse files
ZYNZYN
authored andcommitted
修改悬浮式假数据高度,提供线条距离底部、宽度配置。修改其他BUG。修改了缓存机制。
1 parent 6c5ae4d commit 223da05

File tree

13 files changed

+507
-1169
lines changed

13 files changed

+507
-1169
lines changed

YNPageScrollViewController.xcworkspace/xcuserdata/zyn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 122 additions & 922 deletions
Large diffs are not rendered by default.

YNPageScrollViewController/AppDelegate.m

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,8 @@ @implementation AppDelegate
1616

1717

1818
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19-
// Override point for customization after application launch.
20-
19+
2120
return YES;
2221
}
2322

24-
- (void)applicationWillResignActive:(UIApplication *)application {
25-
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26-
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
27-
}
28-
29-
- (void)applicationDidEnterBackground:(UIApplication *)application {
30-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
31-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
32-
}
33-
34-
- (void)applicationWillEnterForeground:(UIApplication *)application {
35-
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
36-
}
37-
38-
- (void)applicationDidBecomeActive:(UIApplication *)application {
39-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
40-
}
41-
42-
- (void)applicationWillTerminate:(UIApplication *)application {
43-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44-
}
45-
4623
@end

YNPageScrollViewController/Demo/TestViewController/YNTestBaseViewController.m

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ - (void)viewDidLoad{
7272
NSLog(@"上啦加载完成");
7373
[weakself.tableView.mj_header endRefreshing];
7474
[weakself.tableView reloadData];
75-
[self.indicatorView stopAnimating];
76-
self.label.hidden = NO;
75+
//调整占位图footer
76+
[weakself.ynPageScrollViewController reloadPlaceHoderViewFrame];
77+
[weakself.indicatorView stopAnimating];
78+
weakself.label.hidden = NO;
7779
});
7880
}];
7981

@@ -92,10 +94,13 @@ - (void)viewDidLoad{
9294
}
9395
NSLog(@"下拉加载完成");
9496
[weakself.tableView.mj_footer endRefreshing];
97+
9598
[weakself.tableView reloadData];
99+
//调整占位图footer
100+
[weakself.ynPageScrollViewController reloadPlaceHoderViewFrame];
96101

97-
[self.indicatorView stopAnimating];
98-
self.label.hidden = NO;
102+
[weakself.indicatorView stopAnimating];
103+
weakself.label.hidden = NO;
99104
});
100105
}];
101106

-21.7 KB
Binary file not shown.

YNPageScrollViewController/Libs/YNPageScrollViewController/YNPageScrollViewController.h

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ typedef void(^AddButtonAtion) (UIButton *button ,YNPageScrollViewController *pag
3636

3737
@interface YNPageScrollViewController : UIViewController
3838
/** 控制器*/
39-
@property (nonatomic, strong) NSArray *viewControllers;
39+
@property (nonatomic, strong) NSMutableArray *viewControllers;
4040
/** 菜单Menu标题*/
41-
@property (nonatomic, strong) NSArray *titleArrayM;
41+
@property (nonatomic, strong) NSMutableArray *titleArrayM;
4242
/** 当前控制器*/
4343
@property (nonatomic, strong) UIViewController *currentViewController;
4444
/** 当前index*/
@@ -64,29 +64,63 @@ typedef void(^AddButtonAtion) (UIButton *button ,YNPageScrollViewController *pag
6464

6565
- (instancetype)init UNAVAILABLE_ATTRIBUTE;
6666

67-
/** 初始化*/
67+
/**
68+
* 初始化控制器
69+
*
70+
* @param viewControllers 控制器数组
71+
* @param titleArrayM 菜单title数组
72+
* @param configration 配置信息
73+
*
74+
*/
6875
+ (instancetype)pageScrollViewControllerWithControllers:(NSArray *)viewControllers titles:(NSArray *)titleArrayM Configration:(YNPageScrollViewMenuConfigration *)configration;
6976

70-
/** 选中第几页*/
77+
/**
78+
* 选中第几页
79+
*
80+
* @param index 第几页 从0开始
81+
* @param animated 是否动画
82+
*/
7183
- (void)setPageScrollViewMenuSelectPageIndex:(NSInteger)index animated:(BOOL)animated;
7284

73-
/** 添加控制器子控制器 暂未实现*/
74-
- (void)addAddButtonViewController:(UIViewController *)viewController;
75-
76-
/** 移除控制器子控制器 暂未实现 */
77-
- (void)removeAddButtonViewController:(UIViewController *)viewController;
78-
79-
/** 添加title 暂未实现*/
80-
- (void)addPageScrollViewControllerWithTitle:(NSString *)title;
81-
82-
/** 当前PageScrollViewVC作为子控制器*/
85+
/**
86+
* 为YNPageScrollViewControoler添加一个title 控制器
87+
*
88+
* @param title 菜单title
89+
* @param viewController 目标控制器
90+
*/
91+
- (void)addPageScrollViewControllerWithTitle:(NSString *)title viewController:(UIViewController *)viewController;
92+
93+
/**
94+
* 为YNPageScrollViewControoler移除一个title 控制器
95+
*
96+
* @param title 菜单title
97+
*/
98+
- (void)removePageScrollControllerWithTtitle:(NSString *)title;
99+
100+
- (void)removePageScrollControllerWithIndex:(NSInteger)index;
101+
102+
103+
/**
104+
* 当前PageScrollViewVC作为子控制器
105+
*
106+
* @param parentViewControler 父类控制器
107+
* @param isAfterLoadData 是否是在加载数据之后
108+
*/
83109
- (void)addSelfToParentViewController:(UIViewController *)parentViewControler isAfterLoadData:(BOOL)isAfterLoadData;
84110

85-
/** 移除PageScrollViewVC*/
111+
/**
112+
* 从父类控制器里面移除自己(PageScrollViewVC)
113+
*/
86114
- (void)removeSelfViewController;
87115

88-
116+
/**
117+
* 悬浮式:刷新TableFooter的补位Frame
118+
*/
89119
- (void)reloadPlaceHoderViewFrame;
90120

121+
/**
122+
* 悬浮式:刷新TableViewHeader的高度
123+
*/
124+
- (void)reloadHeaderViewFrame;
91125

92126
@end

0 commit comments

Comments
 (0)