mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-13 14:56:03 +10:00
refine waver and sampleview
This commit is contained in:
@@ -445,6 +445,7 @@ class ConversationViewController: UIViewController {
|
||||
// 先调整一下初次的 contentInset
|
||||
setConversaitonCollectionViewOriginalContentInset()
|
||||
|
||||
//以前的方法不能保证边界情况滚到底部
|
||||
scrollToLastMessage()
|
||||
}
|
||||
|
||||
@@ -1173,6 +1174,7 @@ extension ConversationViewController: UICollectionViewDataSource, UICollectionVi
|
||||
super.viewDidDisappear(animated)
|
||||
FayeService.sharedManager.delegate = nil
|
||||
timer.invalidate()
|
||||
self.waverView.removeFromSuperview()
|
||||
}
|
||||
|
||||
// MARK: UIScrollViewDelegate
|
||||
|
||||
@@ -72,7 +72,7 @@ class SampleView: UIView {
|
||||
for (index, percent) in enumerate(samples) {
|
||||
|
||||
let x = CGFloat(index) * sampleWidth + sampleGap * CGFloat(index)
|
||||
let sampleHeightMax = viewHeight * 0.8
|
||||
let sampleHeightMax = viewHeight * 0.7
|
||||
var realSampleHeight = percent * viewHeight
|
||||
|
||||
realSampleHeight = realSampleHeight < 1 ? 1 : realSampleHeight
|
||||
|
||||
@@ -31,9 +31,19 @@ class YepWaverView: UIView {
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
waver = Waver(frame: CGRectMake(0, CGRectGetHeight(self.bounds)/2.0 - 50.0, CGRectGetWidth(self.bounds), 100.0))
|
||||
waver = Waver(frame: CGRectMake(0, CGRectGetHeight(self.bounds)/2.0 - 50.0 - 40.0, CGRectGetWidth(self.bounds), 100.0))
|
||||
self.backgroundColor = UIColor(white: 1.0, alpha: 0.9)
|
||||
}
|
||||
|
||||
override func willMoveToSuperview(newSuperview: UIView?) {
|
||||
super.willMoveToSuperview(newSuperview)
|
||||
self.addSubview(waver)
|
||||
}
|
||||
|
||||
override func removeFromSuperview() {
|
||||
super.removeFromSuperview()
|
||||
waver.removeFromSuperview()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user