We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【Xcode 11.4.1 (11E503a) 】【iPad 12.4.7】【WMPageController 2.3.0】
关键的代码片段 /* vc是控制器数组的一个元素。 当vc标题发生变化时,使用 -updateTitle:atIndex 函数,更新指定 index 的标题,存在一个问题:如果 新title.length > 旧title.length,则 MenuItem 标题部分内容显示省略号 */ vc.updateTitleBlock = ^(WXCouponTitleModel * _Nonnull titleModel) { StrongSelf [strongSelf.lists objectAtIndex:0].count = titleModel.count; [strongSelf updateTitle:@"xxx" atIndex:0]; };
其他任何你觉得有可能帮助的信息; 使用 -reloadData 不存在 提个问题 #2 中描述的问题
The text was updated successfully, but these errors were encountered:
- (void)updateTitle:(NSString *)title atIndex:(NSInteger)index andWidth:(BOOL)update { if (!update) { return; } [self resetFrames]; }
2.delegate或dataSource数据源没有更改
- (void)updateTitle:(NSString *)title atIndex:(NSInteger)index { [self.menuView updateTitle:title atIndex:index andWidth:NO]; }
看下这两个方法返回值 - (NSString *)pageController:(LMPageController *)pageController titleAtIndex:(NSInteger)index - (CGFloat)menuView:(LMPageMenuView *)menu widthForItemAtIndex:(NSInteger)index
1.修改
- (NSString *)pageController:(LMPageController *)pageController titleAtIndex:(NSInteger)index
2.修改
- (CGFloat)menuView:(LMPageMenuView *)menu widthForItemAtIndex:(NSInteger)index
3.执行
self.tagArray[0] = @"目标值"; [self.menuView updateTitle:@"目标值" atIndex:0 andWidth:YES];
这种写法只是把功能实现了,但是直接跨过WMPageController去操作menuView这种方式欠妥。
Sorry, something went wrong.
No branches or pull requests
【Xcode 11.4.1 (11E503a) 】【iPad 12.4.7】【WMPageController 2.3.0】
关键的代码片段
/*
vc是控制器数组的一个元素。
当vc标题发生变化时,使用 -updateTitle:atIndex 函数,更新指定 index 的标题,存在一个问题:如果 新title.length > 旧title.length,则 MenuItem 标题部分内容显示省略号
*/
vc.updateTitleBlock = ^(WXCouponTitleModel * _Nonnull titleModel) {
StrongSelf
[strongSelf.lists objectAtIndex:0].count = titleModel.count;
[strongSelf updateTitle:@"xxx" atIndex:0];
};
其他任何你觉得有可能帮助的信息;
使用 -reloadData 不存在 提个问题 #2 中描述的问题
The text was updated successfully, but these errors were encountered: