ithinkeryz / yzdisplayviewcontroller Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
发现滑动的时候会提前走下一个viewdidload 的方法。 比如说 频道1 频道2 频道3 从1滑到2 应该只调用2的viewdidload 但是发现会提前调用 3的viewdidload
YZDisplayViewControllerDemo[2547:108596] Could not load the "1" image referenced from a nib in the bundle with identifier "iThinker.YZDi"
应该是RequesCover.m中awakeFromNib方法中加载图片名字少了.jpg的问题
设置titleScrollViewColor失效 无法修改背景颜色
通过点击上边的标题进行切换可以添加动画效果吗?
在iphoneX上标题错乱
使用屏幕的宽高来做计算是一种很**的做法~。
作者根本不懂怎么写一个通用组件
您好!我查了一下,应该是页面上多个scrollView造成的,系统怕有冲突把返回顶部功能禁掉了。请问有什么好的解决方法吗?谢谢!
//titleY是一个view的高度,下面是childVC的地方。
self.contentScrollView.frame = CGRectMake(0, titleY, YZScreenW, YZScreenH - titleY );
1、我现在的需求是想滚动上去 改变titleY 。滚动下来 回到原位。(可以实现)
2、但是有个问题是我在当前页面滚动一定的距离 -> 切换childVC的时候,第二个滚动区域有问题。
请问有什么方法可以解决吗?
公司需求, 每个标签需要标注数量 例如: 科技(19) 财经(2).
如何在获取数据后, 改变标题呢
iOS11 系统下反复切换上下级界面时,会出现空白的情况,titleScrollView,contentScrollView都不见了。iOS10系统下出现几率也有但是非常低。
初始化进入的时候,默认选中的没有放大效果哦
还有就是通过点击分类来选择控制器的话,字体也没有缩小回去,你全部点击一遍后,分类字体全部变大一号了
// 段子
ViewController1 *wordVc1 = [[ViewController1 alloc] init];
wordVc1.title = @"ViewController1";
[self addChildViewController:wordVc1];
// 段子
ViewController2 *wordVc2 = [[ViewController2 alloc] init];
wordVc2.title = @"ViewController2";
[self addChildViewController:wordVc2];
// 段子
ViewController3 *wordVc3 = [[ViewController3 alloc] init];
wordVc3.title = @"ViewController3";
[self addChildViewController:wordVc3];
添加了三个子 vc,然后看了下生命周期的log:
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"%@ %@",NSStringFromSelector(_cmd),self.class);
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSLog(@"%@ %@",NSStringFromSelector(_cmd),self.class);
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
NSLog(@"%@ %@",NSStringFromSelector(_cmd),self.class);
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
NSLog(@"%@ %@",NSStringFromSelector(_cmd),self.class);
}
-(void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
NSLog(@"%@ %@",NSStringFromSelector(_cmd),self.class);
}
发现都是乱的,不知道是不是因为你用的 collectionView 嵌套 的 vc 导致的....
YZDisplayViewController.m这个文件里
420行:
[self setUpTitleSaceWithOffset:offsetX rightLabel:rightLabel leftLabel:leftLabel];
是不是setUpTitleSize啊?
我改了lable为button ,在颜色渐变会有问题
底部的下标线的长度能定制嘛?想均分长度
我在继承过来的界面设置标题滚动样式、文本选中/普通颜色等都没用
更新界面的方法 refreshDisplay 少了 [self.titleWidths removeAllObjects]; 否则 title的宽度是不准确的
您好,拜读了一下您的代码。您是根据水平有多少个分类标题就往里面添加多少个控制器,大的控制管理他们的. 您有没有考虑通过类似TableViewCell 的重用机制来做。 比如在水平添加三个控制器,通过重用他们达到效果呢? 或者其他方式来提搞性能呢?因为水平有6七个还行,如果水平有30个的话,是不是要加载30个控制器呢?这样感觉性能挺不好的。谢谢。
项目中刚好有类似的要求,只希望框架中留一个titlelabel滚动结束时触发的事件就好,不要过多的考虑望其他方面的内容,不如说网络请求。。。
// 一次性设置所有标题属性
// _titleScrollViewColor = titleScrollViewColor; 这里应该用self.titleScrollView 否则不走setter方法
self.titleScrollViewColor = titleScrollViewColor;
}
_titleFont = titleFont;
}
if (_titleColorGradientStyle == YZTitleColorGradientStyleFill && _titleWidth > 0) {
@throw [NSException exceptionWithName:@"YZ_ERROR" reason:@"标题颜色填充不需要设置标题宽度" userInfo:nil];
}
}
框架非常好,简单实用.
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_YZDisplayViewController", referenced from:
OBJC_CLASS$_ViewController in ViewController.o
"OBJC_METACLASS$_YZDisplayViewController", referenced from:
OBJC_METACLASS$_ViewController in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
不知道是不是你这个子控制器只能是table?
// 判断控制器的view有没有加载,没有就加载,加载完在发送通知
if (vc.view) {
_selectIndex = i;
// 发出通知点击标题通知
[[NSNotificationCenter defaultCenter] postNotificationName:YZDisplayViewClickOrScrollDidFinshNote object:vc];
// 发出重复点击标题通知
if (_selIndex == i) {
[[NSNotificationCenter defaultCenter] postNotificationName:YZDisplayViewRepeatClickTitleNote object:vc];
}
}
想借鉴网易的效果 ,但是需要下标。 不知道如何实现 有人做类似的功能吗?
如题
现在标题只有两个,但是视觉效果感觉两个标题靠的很近,没有在屏幕上等分展示
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.