Comments (6)
您好, 请问下这个问题您有解决吗
from yzdisplayviewcontroller.
你只要初始化就会执行Controller的声明周期,比如你初始化一个实例添加到第4个tabbar上。虽然你没点第4个Tabbar,但是它的ViewDidLoad还是走了。 这是有问题的
from yzdisplayviewcontroller.
发现滑动的时候会提前走下一个viewdidload 的方法。 比如说 频道1 频道2 频道3 从1滑到2 应该只调用2的viewdidload 但是发现会提前调用 3的viewdidload
from yzdisplayviewcontroller.
@meilulu viewdidload 提前走的问题你解决了吗
from yzdisplayviewcontroller.
最重要的就是要保证生命周期调用的正确性,不然使用起来会出现很多问题。这是个严重的问题。
from yzdisplayviewcontroller.
问题出现的原因是YZDisplayViewController中用到的contentScrollView属性是一个系统属性(谁发现的?为什么是个系统属性?用来干啥的?素质三问,希望有大神指教).
但是当你修改contentScrollView为别的属性,调用 setUpTitleEffect:设置了*titleWidth的时候,你会发现第一vc的titlelabel莫名其妙的不显示了.原因是因为添加第一个label的时候titleScrollView并没有初始化,解决办法是在YZDisplayViewController的setUpAllTitle方法中,将[_titleScrollView addSubview:label]改为[self.titleScrollView addSubview:label]即可解决问题
之所以作者没有发现这个问题,感觉是因为系统contentScrollView的setter方法会被调用很多次,而在此方法中作者对titleScrollView进行了self.titleScrollView的初始化
from yzdisplayviewcontroller.
Related Issues (20)
- 赞!
- 子控制器里 如何修改父容器的标题
- bugs HOT 1
- 设置titleScrollViewColor失效
- 子控制器是UICollectionView,滚动和坐标计算好像有问题 HOT 1
- 能否增加支持图片,标题上面增加图片
- 发现bug 已替你修复 优化 HOT 1
- selectIndex点击的时候没赋值
- 你好,titleScale标题放大有bug哦 HOT 1
- 设置titleScrollViewColor失效 无法修改背景颜色 HOT 1
- 想既要下标又要缩放。
- 比如我有栏目增加或者删除,栏目位置的变化,怎么做?
- iphoneX下面标题会错乱 HOT 6
- 如果在创建子VC的时候设置了子VC的属性 就会调用viewdidload
- 进入列表的第一个初始化页面 通知 会发送两次?为什么?导致请求数据请求两次 YZDisplayViewClickOrScrollDidFinshNote这个通知会接到两次
- iOS 11 系统
- 有支持滚动上移吗?
- 在iOS12beta版上的问题 HOT 2
- 只有两个标题时,标题位置如何做到占屏幕宽度一半一半呢?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yzdisplayviewcontroller.