Giter VIP home page Giter VIP logo

yzdisplayviewcontroller's Issues

设置titleScrollViewColor失效 无法修改背景颜色

// 一次性设置所有标题属性

  • (void)setUpTitleEffect:(void(^)(UIColor **titleScrollViewColor,UIColor **norColor,UIColor **selColor,UIFont **titleFont,CGFloat *titleHeight,CGFloat *titleWidth))titleEffectBlock{
    UIColor *titleScrollViewColor;
    UIColor *norColor;
    UIColor *selColor;
    UIFont *titleFont;
    if (titleEffectBlock) {
    titleEffectBlock(&titleScrollViewColor,&norColor,&selColor,&titleFont,&_titleHeight,&_titleWidth);
    if (norColor) {
    self.norColor = norColor;
    }
    if (selColor) {
    self.selColor = selColor;
    }
    if (titleScrollViewColor) {

// _titleScrollViewColor = titleScrollViewColor; 这里应该用self.titleScrollView 否则不走setter方法
self.titleScrollViewColor = titleScrollViewColor;
}
_titleFont = titleFont;
}

if (_titleColorGradientStyle == YZTitleColorGradientStyleFill && _titleWidth > 0) {
    @throw [NSException exceptionWithName:@"YZ_ERROR" reason:@"标题颜色填充不需要设置标题宽度" userInfo:nil];
}

}

老师好~

项目中刚好有类似的要求,只希望框架中留一个titlelabel滚动结束时触发的事件就好,不要过多的考虑望其他方面的内容,不如说网络请求。。。

有支持滚动上移吗?

//titleY是一个view的高度,下面是childVC的地方。
self.contentScrollView.frame = CGRectMake(0, titleY, YZScreenW, YZScreenH - titleY );

1、我现在的需求是想滚动上去 改变titleY 。滚动下来 回到原位。(可以实现)
2、但是有个问题是我在当前页面滚动一定的距离 -> 切换childVC的时候,第二个滚动区域有问题。
请问有什么方法可以解决吗?

运行不了

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)

有没有考虑重用机制?

您好,拜读了一下您的代码。您是根据水平有多少个分类标题就往里面添加多少个控制器,大的控制管理他们的. 您有没有考虑通过类似TableViewCell 的重用机制来做。 比如在水平添加三个控制器,通过重用他们达到效果呢? 或者其他方式来提搞性能呢?因为水平有6七个还行,如果水平有30个的话,是不是要加载30个控制器呢?这样感觉性能挺不好的。谢谢。

在iOS12beta版上的问题

img_d864006b922e-1
不知道还更不更新这个项目了,要是还更新的话,恭喜你又有任务了。
在iOS12 beta版中会出现这样的问题。在iOS11及之前的系统中正常

单词写错了?

YZDisplayViewController.m这个文件里
420行:
[self setUpTitleSaceWithOffset:offsetX rightLabel:rightLabel leftLabel:leftLabel];
是不是setUpTitleSize啊?

赞!

框架非常好,简单实用.

selectIndex点击的时候没赋值

// 判断控制器的view有没有加载,没有就加载,加载完在发送通知
if (vc.view) {
    _selectIndex = i;
    // 发出通知点击标题通知
    [[NSNotificationCenter defaultCenter] postNotificationName:YZDisplayViewClickOrScrollDidFinshNote object:vc];
    // 发出重复点击标题通知
    if (_selIndex == i) {
        [[NSNotificationCenter defaultCenter] postNotificationName:YZDisplayViewRepeatClickTitleNote object:vc];
    }
}

嵌套的 子 VC 生命周期调用都是乱了的

// 段子
    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 导致的....

你好,titleScale标题放大有bug哦

初始化进入的时候,默认选中的没有放大效果哦

还有就是通过点击分类来选择控制器的话,字体也没有缩小回去,你全部点击一遍后,分类字体全部变大一号了

bugs

使用屏幕的宽高来做计算是一种很**的做法~。
作者根本不懂怎么写一个通用组件

iOS 11 系统

iOS11 系统下反复切换上下级界面时,会出现空白的情况,titleScrollView,contentScrollView都不见了。iOS10系统下出现几率也有但是非常低。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.